Since Ruby is a dynamic language, you cannot have multiple constructors (or, if necessary, a chain of constructors). For example, in the following code:
class A def initialize(one) puts "constructor called with one argument" end def initialize(one,two) puts "constructor called with two arguments" end end
You expect to have 2 constructors with different parameters. However, the last one that has been evaluated will be the constructor of the class. In this case, initialize(one,two) .
Geo
source share