Hi,
I understand that a weakly-typed language like Ruby cannot
support method overloading based on arguments types, but it could allow
identical method names that differ in the _number_ of arguments:
class Foo
def initialize
end
def initialize(arg)
end
def initialize(arg1, arg2)
end
...
end
Is there a way to accomplish this? I suppose making everything optional
is a way but surely not an elegant one:
class Foo
def initialize(arg1=nil, arg2=nil)
...
end
Uwe Lammers.