Last active
July 25, 2016 12:37
-
-
Save ryuta-ito/53f91f5cdb0ccab2986d5612a74bcd15 to your computer and use it in GitHub Desktop.
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 M | |
def asdf | |
p 'asdf' | |
end | |
end | |
module M_ | |
extend M | |
end | |
M_.asdf #=> asdf | |
module M__ | |
extend M | |
asdf # same of self.asdf | |
def M__.ghjk | |
p 'ghjk' | |
end | |
M__.ghjk | |
end | |
class C | |
include M | |
end | |
C.new.asdf #=> asdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment