-
-
Save edisonywh/7a605a26b72951bb0e6d1d93a1680d3a 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
Awesome = Module.new | |
class IncludeModule | |
include Awesome | |
end | |
IncludeModule.ancestors #=> [IncludeModule, Awesome, Object, Kernel, BasicObject] | |
class ExtendModule | |
extend Awesome | |
end | |
ExtendModule #=> [ExtendModule, Object, Kernel, BasicObject] | |
# WHERE IS THE MODULE?! | |
class PrependModule | |
prepend Awesome | |
end | |
PrependModule.ancestors #=> [Awesome, PrependModule, Object, Kernel, BasicObject] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment