Francisco Laguna
1/3/2008 4:34:00 PM
Hi Salai!
I'm afraid you can't. The usual way for overloading a method in this
way is to specify default values for optional parameters:
def new(cent, euro=0)
...
end
with the downside that you'll have to add the optional parameters to
the end of the parameter list. As a side note, I'd be confused by
methods called 'new', and would constantly confuse them with
constructors. But that's just me I guess.
Gentle Breezes
Cisco
Am 03.01.2008 um 16:53 schrieb Salai Khine:
> Dear all,
>
>
> can i use in Ruby the *same Methode name but different Parameter*??
>
> like
>
> def new (cent)
>
> end
>
> def new(euro,cent)
>
> end.
>
> regards,
>
> salai.