Module: Log

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Addition



21
22
23
24
25
26
27
# File 'lib/utils/log.rb', line 21

def self.included(base)
  class << base
    def logger
      Log.logger
    end
  end
end

.loggerObject



11
12
13
# File 'lib/utils/log.rb', line 11

def logger
  @logger ||= Logger.new($stdout)
end

.logger=(logger) ⇒ Object



15
16
17
# File 'lib/utils/log.rb', line 15

def logger=(logger)
  @logger = logger
end

Instance Method Details

#loggerObject



29
30
31
# File 'lib/utils/log.rb', line 29

def logger
  Log.logger
end