Created
October 26, 2009 14:15
-
-
Save matthewrudy/218686 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 IncludeMe | |
def included_innit | |
Child.innit | |
end | |
end | |
module Mod | |
class Child | |
def self.innit | |
puts "I'm Mod's child, innit" | |
end | |
end | |
class Sibling | |
include IncludeMe | |
def innit | |
Child.innit | |
end | |
end | |
end | |
sibling = Mod::Sibling.new | |
sibling.innit # => "I'm Mod's child, innit" | |
sibling.included_innit # => exception |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment