Skip to content

Instantly share code, notes, and snippets.

@matthewrudy
Created October 26, 2009 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewrudy/218686 to your computer and use it in GitHub Desktop.
Save matthewrudy/218686 to your computer and use it in GitHub Desktop.
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