Last active
December 18, 2015 02:29
-
-
Save jessearmand/5711530 to your computer and use it in GitHub Desktop.
Some module test
This file contains 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 Debug | |
def whoAmI? | |
"#{self.name} (\##{self.id}): #{self.to_s}" | |
end | |
end | |
module Debugger | |
def whoAmI? | |
"#{self.id}: #{self.to_s}" | |
end | |
end | |
class Person | |
include Debug | |
include Debugger | |
attr :id, :name | |
def initialize(id, name) | |
@id = id | |
@name = name | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment