From: Gavin Kistner Date: 2004-10-21T10:46:16+09:00 Subject: Re: Idiom -- is there a better way? On Oct 20, 2004, at 10:54 AM, Mark Probert wrote: > class Foo > def bar(fn) > eval "self.#{fn}" > end > end > > class Bar < Foo > def blah > puts "blah here" > end > end > > f = Bar.new > f.bar("blah") Does the function need to be a string argument? f.bar( f.method( :blah ) ) # Pass the actual method reference or, as others have noted: class Foo def bar( meth_name ) self.method(m).call end end ... f.bar( :blah )