Class: Rester::Utils::LoggerWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/rester/utils/logger_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logger = Logger.new(STDOUT)) ⇒ LoggerWrapper

Returns a new instance of LoggerWrapper.



6
7
8
# File 'lib/rester/utils/logger_wrapper.rb', line 6

def initialize(logger = Logger.new(STDOUT))
  @logger = logger
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object (private)



16
17
18
# File 'lib/rester/utils/logger_wrapper.rb', line 16

def method_missing(meth, *args, &block)
  logger.public_send(meth, *args, &block)
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



4
5
6
# File 'lib/rester/utils/logger_wrapper.rb', line 4

def logger
  @logger
end