From: jweirich@... Date: 2001-07-06T14:36:27+09:00 Subject: [ruby-talk:17385] Re: newbee: Java -> Ruby >>>>> "Uwe" == Uwe Matthaeus writes: Uwe> Hi Uwe> I have the following code in Java: Uwe> class MyMerge implements MyInterface extends MyBase Uwe> { Uwe> ..... Uwe> } Uwe> How can i do that in ruby ? Uwe> Thanks in advance ! All you need is ... class MyMerge < MyBase ..... end Inside the class, implement the methods that make up MyInterface. In Ruby, interfaces are implicit. If the class implements the methods expected in an interface, then the objects of that class can be used anywhere the interface is expected. -- -- Jim Weirich jweirich@one.net http://w3.one.net/~jweirich --------------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)