From: "Stathy G. Touloumis" Date: 2002-10-01T23:20:42+09:00 Subject: Re: OO Perl -> Ruby >Now, in Perl, the $manager that gets returned by the Cudd_Init function >gets blessed and becomes the reference to the object - the $manager >reference can respond to a certain set of method calls on it's own. >Blesssing $manager into the Cudd package also adds some additional >methods that are defined in the Cudd package. In Ruby, calling: >CuddClass.new will call CuddClass' initialize and return a reference to an >instance of CuddClass which is different from what's happening in Perl. So >the question is, what's the best way to translate this into Ruby? I'm >thinking that I could use method_missing to redirect unknown (or at >least of unknown to CuddClass, but known to @manager) method calls to the >@manager reference. Sounds like you want to use the delegate design pattern built into Ruby. Examples are given in the Ruby book.