Karl-Heinz Wild
2/15/2008 1:34:00 PM
On 15.02.2008, at 14:30, Karl-Heinz Wild wrote:
> On 15.02.2008, at 14:17, Sebastian Hungerecker wrote:
>
>> Mickael Rouvier wrote:
>>> class A
>>> def toto
>>> puts "tttt"
>>> end
>>> end
>>>
>>>
>>> class B < A
>>> def toto
>>> puts "mmmmm"
>>> end
>>>
>>> def tata
>>>
>>> end
>>> end
>>>
>>> And I would like in B.tata to call the method toto of A.
>
> class A
> def toto
> puts "tttt"
> end
> end
>
> class B < A
> alias :totoo :toto
> def toto
> puts "mmmm"
> end
def tata
totoo
end
> end
>
> b = B.new
> b.toto
> b.totoo
Ups. :)
Karl-Heinz