Created
April 7, 2014 09:17
-
-
Save waynerobinson/10017139 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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