Created
May 18, 2015 16:00
-
-
Save arnvald/03d184fcf1a8406539bb 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 ShowMyMethods | |
def self.included(base) | |
puts (base.instance_methods - Object.instance_methods).sort | |
end | |
end | |
class IncludeFirst | |
include ShowMyMethods | |
def it_wont_be_shown; end | |
end | |
class IncludeLast | |
def it_will_be_shown; end | |
include ShowMyMethods | |
end | |
# λ ARV ruby → ruby including.rb | |
# it_will_be_shown | |
# λ ARV ruby → |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment