Skip to content

Instantly share code, notes, and snippets.

@sxua
Created December 6, 2011 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sxua/1438299 to your computer and use it in GitHub Desktop.
Save sxua/1438299 to your computer and use it in GitHub Desktop.
eval of method
eval([('d'..'f'), [['my', 'method'].join('_')], ["\n"]].map(&:to_a).map(&:join).join(' ') + ['puts "That\'s my method!"','end','my_method'].join("\n"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment