On Tuesday 22 July 2008, Marcin Balinski wrote:
Is there any other way to achieve this?
Are you using define method directly in the class body or from within an
instance method? In the first case (and also if you’re using it from a
method), then you need to define method_name as a class method, not as
By the way, you don’t need to call to_sym, since define_method also
string as argument.
I hope this helps