Created
October 25, 2011 01:46
-
-
Save bkempner/1311073 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
module Foo | |
module_function | |
def wtf? | |
'wtf?' | |
end | |
end | |
Foo.wtf? #=> 'wtf?' | |
module Bar | |
extend self | |
def lol! | |
'lol!' | |
end | |
end | |
Bar.lol! #=> 'lol!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what does
module_function
(line 2) do?err... LMGTFU:
http://www.ruby-doc.org/core-1.9.2/Module.html