Skip to content

Instantly share code, notes, and snippets.

@ptzn
Created March 18, 2011 21:44
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/876902 to your computer and use it in GitHub Desktop.
Save ptzn/876902 to your computer and use it in GitHub Desktop.
def gimme_class
method_class = Class.new do
def where_am_i?
puts "in method!"
end
end
obj = method_class.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