-
-
Save lhz/6d609aaae2c5cbfc8addc440cbd95ed3 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 Foo | |
module ClassMethods | |
def bar | |
"hi from .bar" | |
end | |
end | |
def baz | |
"hi from #baz" | |
end | |
end | |
class A | |
include Foo | |
extend Foo::ClassMethods | |
end | |
A.bar # => "hi from .bar" | |
a = A.new | |
a.baz # => "hi from #baz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment