From: Albert Wagner Date: 2002-01-20T03:34:27+09:00 Subject: Re: dynamic method creation On Saturday 19 January 2002 03:19 am, you wrote: > On Sat, 19 Jan 2002, Albert Wagner wrote: > > Wow! Thanks a lot guys. There are several different approaches > > mentioned here and I appreciate every one. ( I am just a little bit > > suprised that no one mentioned Struct) Thanks again. > > I'm not sure it fits your bill but I didn't see anyone mention > define_method (in 1.7 series) which can sometimes be used for dynamic > method creation: > > irb(main):003:0> class C > irb(main):004:1> define_method(:m) {1} > irb(main):005:1> end > # > irb(main):006:0> C.new.m > 1 > > Regards, > > Robert I haven't kept up with what is coming. I'll watch for that. Thanks. -- Quantum Mechanics: The dreams stuff is made of