Created
March 12, 2012 04:52
-
-
Save yesezra/2019882 to your computer and use it in GitHub Desktop.
It shouldn't be this hard
This file contains 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
module Hi | |
def self.included(base) | |
base.class_eval do #Enumerable | |
def hello | |
puts "hello" | |
end | |
end | |
end | |
end | |
module Enumerable | |
include Hi | |
end | |
[].hello # "hello" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks, got it.