Skip to content

Instantly share code, notes, and snippets.

@tal
Created December 14, 2009 16:42
Show Gist options
  • Save tal/256200 to your computer and use it in GitHub Desktop.
Save tal/256200 to your computer and use it in GitHub Desktop.
klass.replace_block(:matcher,[array,of,values]) do |scoped_klass,individual_value|
scoped_klass.my_method :foo, individual_value
end
I want to implement the second one via instance_eval on klass but i'm not sure how to pass the block variable.
klass.replace_block(:matcher,[array,of,values]) do |individual_value|
my_method :foo, individual_value
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment