Class: PrependLoggerDecorator::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/prepend_logger_decorator.rb

Instance Method Summary collapse

Constructor Details

#initialize(logger, prepend_msg) ⇒ Logger

Returns a new instance of Logger.



5
6
7
8
# File 'lib/prepend_logger_decorator.rb', line 5

def initialize logger, prepend_msg
  @logger = logger
  @prepend_msg = prepend_msg
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



10
11
12
# File 'lib/prepend_logger_decorator.rb', line 10

def method_missing(m, *args, &block)
  @logger.send(m, *args, &block)
end