Skip to content

Instantly share code, notes, and snippets.

@yesezra
Created March 12, 2012 04:52
Show Gist options
  • Save yesezra/2019882 to your computer and use it in GitHub Desktop.
Save yesezra/2019882 to your computer and use it in GitHub Desktop.
It shouldn't be this hard
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"
@rajasharan
Copy link

thanks, got it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment