Created
November 21, 2016 14:05
-
-
Save roobert/4bb42d0e7ffcf982b9c723465bedc1ca to your computer and use it in GitHub Desktop.
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
class Logger | |
def self.logger | |
@logger ||= object_id | |
end | |
def message(m) | |
puts m | |
end | |
module Stuff | |
def logmsg(m) | |
logger.message(m) | |
end | |
end | |
end | |
class Test0 | |
include Logger::Stuff | |
attr_accessor :log | |
def initialize(logger: Logger.new) | |
log = logger | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment