Class: RmsApiRuby::Chain::Logger

Inherits:
RmsApiRuby::Chain show all
Defined in:
lib/rms_api_ruby/chain/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(type, message) ⇒ Logger

Returns a new instance of Logger.



4
5
6
7
8
9
# File 'lib/rms_api_ruby/chain/logger.rb', line 4

def initialize(type, message)
  @type         = type
  @message      = message
  @logger       = RmsApiRuby.configuration.logger
  @logger.level = RmsApiRuby.configuration.log_level
end

Instance Method Details

#callObject



11
12
13
# File 'lib/rms_api_ruby/chain/logger.rb', line 11

def call
  chain { @logger.send(@type, @message) }
end