Skip to content

Instantly share code, notes, and snippets.

@waynerobinson
Created April 7, 2014 09:17
Show Gist options
  • Save waynerobinson/10017139 to your computer and use it in GitHub Desktop.
Save waynerobinson/10017139 to your computer and use it in GitHub Desktop.
class Foo
def self.with_class_eval(&block)
class_eval(&block)
end
end
Foo.with_class_eval do
def some_method
puts "Some method"
end
end
Foo.new.some_method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment