-
-
Save bosskovic/6239658 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
module Base | |
def listen | |
puts "think: interesting stuff ..." | |
end | |
end | |
class Attendee | |
include Base | |
end | |
module Tweets | |
def listen | |
super | |
puts "tweet: great conference! :D" | |
end | |
end | |
module Applause | |
def listen | |
super | |
puts "applause!" | |
end | |
end | |
attendee = Attendee.new | |
class Attendee | |
include Tweets | |
include Applause | |
end | |
attendee.listen | |
# think: interesting stuff ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment