Skip to content

Instantly share code, notes, and snippets.

@patmaddox
Created April 23, 2009 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save patmaddox/100613 to your computer and use it in GitHub Desktop.
Save patmaddox/100613 to your computer and use it in GitHub Desktop.
# The goal is to make classes who include Foo also get the methods
# from Bar, but after Foo has already been included
module Foo
def foo; end
end
class FooBar
include Foo
end
module Bar
def bar; end
end
module Foo
include Bar
end
FooBar.new.foo # => nil
FooBar.new.bar # => NoMethodError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment