Created
May 7, 2015 14:14
-
-
Save leoallen85/104079b6a89103e1bb72 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
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