One shortcoming of define_method is that it does not allow you to
specify a method body that expects a block. If you need to dynamically
create a method that accepts a block, you will need to use the def
statement within class_eval. Here's a trivial example:
class Module
def acts_as_thing(name,
On Fri, Oct 19, 2012 at 8:28 PM, John Merlino stoici...@aol.com wrote:
One shortcoming of define_method is that it does not allow you to
specify a method body that expects a block. If you need to dynamically
create a method that accepts a block, you will need to use the def
statement within
2 matches
Mail list logo