From: Robert Feldt Date: 2002-01-19T18:19:49+09:00 Subject: Re: dynamic method creation 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