From: "David A. Black" Date: 2005-08-30T05:58:18+09:00 Subject: Re: Adding instance methods to class at runtime Hi -- On Tue, 30 Aug 2005, Jon A. Lambert wrote: > I want to add instance methods to a class at runtine. There's no other time to do it :-) > $ cat testcmds.rb > module Bar > def hello > puts "hello called" > end > end > > class Foo > end > > Foo.include(Bar) You can reopen the class and do the include: class Foo include Bar end or you can use send: Foo.send("include", Bar) David -- David A. Black dblack@wobblini.net