Skip to content

Instantly share code, notes, and snippets.

@ryuta-ito
Last active July 25, 2016 12:37
Show Gist options
  • Save ryuta-ito/53f91f5cdb0ccab2986d5612a74bcd15 to your computer and use it in GitHub Desktop.
Save ryuta-ito/53f91f5cdb0ccab2986d5612a74bcd15 to your computer and use it in GitHub Desktop.
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