Class: Twing::Modules::CustomLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/twing/utility/logger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logger, prefix) ⇒ CustomLogger

Returns a new instance of CustomLogger.



6
7
8
9
# File 'lib/twing/utility/logger.rb', line 6

def initialize(logger, prefix)
  @logger = logger
  @prefix = prefix
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



17
18
19
# File 'lib/twing/utility/logger.rb', line 17

def method_missing(method, *args)
  @logger.send(method, *args)
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



4
5
6
# File 'lib/twing/utility/logger.rb', line 4

def logger
  @logger
end