Skip to content

Instantly share code, notes, and snippets.

@jpemberthy
Forked from febuiles/foo.rb
Created January 16, 2012 22:23
Show Gist options
  • Save jpemberthy/1623362 to your computer and use it in GitHub Desktop.
Save jpemberthy/1623362 to your computer and use it in GitHub Desktop.
class Foo
foo = %w(a b c)
BAR = %w(a b c)
foo.each do |method|
define_method(method) { p method.upcase! }
end
BAR.each do |method|
define_method(method.upcase!) { p method }
end
p foo
p BAR
end
Foo.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment