Class: Rester::Utils::LoggerWrapper
- Inherits:
-
Object
- Object
- Rester::Utils::LoggerWrapper
- Defined in:
- lib/rester/utils/logger_wrapper.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(logger = Logger.new(STDOUT)) ⇒ LoggerWrapper
constructor
A new instance of LoggerWrapper.
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
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
4 5 6 |
# File 'lib/rester/utils/logger_wrapper.rb', line 4 def logger @logger end |