Module: Messed::Logger::LoggingModule

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(cls) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/messed/logger.rb', line 6

def self.included(cls)
  cls.class_eval(<<-HERE_DOC, __FILE__, __LINE__)

  def self.logger
    Messed::Logger.instance.logger
  end

  def self.logger=(logger)
    Messed::Logger.instance.logger = logger
  end

  HERE_DOC
end

Instance Method Details

#loggerObject



20
21
22
# File 'lib/messed/logger.rb', line 20

def logger
  Messed::Logger.instance.logger
end

#logger=(logger) ⇒ Object



24
25
26
# File 'lib/messed/logger.rb', line 24

def logger=(logger)
  Messed::Logger.instance.logger = logger
end