Skip to content

Instantly share code, notes, and snippets.

@ptzn
Created March 18, 2011 21:45
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 ptzn/876905 to your computer and use it in GitHub Desktop.
Save ptzn/876905 to your computer and use it in GitHub Desktop.
def gimme_class
eval %{
class MethodClass
def where_am_i?
puts "in method!"
end
end
}
obj = MethodClass.new
obj.where_am_i?
end
# > gimme_class => in method!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment