Created
May 26, 2017 15:33
-
-
Save AJFaraday/6982015737d7ba0bbae624d1f6b31bdf 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 my_method | |
puts 'original' | |
end | |
end | |
module Bar | |
def my_method | |
puts 'overridden' | |
end | |
end | |
Foo.send(:include, Bar) | |
Foo.new.my_method | |
# original |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would refinements work for your use case?