Skip to content

Instantly share code, notes, and snippets.

@oceansize
Forked from leoallen85/method_lookup_path.rb
Last active August 29, 2015 14:20
Show Gist options
  • Save oceansize/2dda0e90fca7701f5b8e to your computer and use it in GitHub Desktop.
Save oceansize/2dda0e90fca7701f5b8e to your computer and use it in GitHub Desktop.
class Base
def call
p "Base"
end
end
module Mixin
def call
p "Mixin"
super
end
end
module AnotherMixin
def call
p "AnotherMixin"
super
end
end
class User < Base
include Mixin
include AnotherMixin
def call
p "User"
super
end
end
User.new.call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment