From: Dr Nic Date: 2006-07-25T20:31:55+09:00 Subject: Re: Defining a method with an argument with a default value Oooh. And another cool use of class_eval is: >> code = %q{ def bar(tar=0) tar * 2 end } => " def bar(tar=0)\n tar * 2\nend" >> Foo.class_eval code => nil Foo.new.bar 10 => 20 So, this means you can take the text to eval against the class from anywhere. :) -- Posted via http://www.ruby-forum.com/.