From: Nicholas Van Weerdenburg Date: 2005-01-26T12:45:24+09:00 Subject: Re: Injecting methods from one class into another. On Wed, 26 Jan 2005 00:40:49 +0900, George Moschovitis wrote: > > Object methods do not work in vacuum, they usually use instance > > variables to reffer to the object's state, possibly changing it > > (remember encapsulation ;-)?). How would you expect your > > inject_method() deal with it? > > I thought Ruby promotes 'duck typing'. > > I would like to inject specific methods between specific classes. The > destination class has all the instance variables needed to succesfully > execute the method. > > That's not duck typing, it's duck cloning, Dr. Frankenstein! -- Nicholas Van Weerdenburg