Class: ZapierRuby::LoggerDecorator
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- ZapierRuby::LoggerDecorator
- Defined in:
- lib/zapier_ruby/logger_decorator.rb
Instance Attribute Summary collapse
-
#enable_logging ⇒ Object
Returns the value of attribute enable_logging.
Instance Method Summary collapse
- #debug(message) ⇒ Object
- #error(message) ⇒ Object
- #info(message) ⇒ Object
-
#initialize(enable_logging) ⇒ LoggerDecorator
constructor
A new instance of LoggerDecorator.
Constructor Details
#initialize(enable_logging) ⇒ LoggerDecorator
Returns a new instance of LoggerDecorator.
5 6 7 8 |
# File 'lib/zapier_ruby/logger_decorator.rb', line 5 def initialize(enable_logging) self.enable_logging = enable_logging super(ZapierRuby.config.logger) end |
Instance Attribute Details
#enable_logging ⇒ Object
Returns the value of attribute enable_logging.
3 4 5 |
# File 'lib/zapier_ruby/logger_decorator.rb', line 3 def enable_logging @enable_logging end |
Instance Method Details
#debug(message) ⇒ Object
18 19 20 |
# File 'lib/zapier_ruby/logger_decorator.rb', line 18 def debug() super if enable_logging end |
#error(message) ⇒ Object
10 11 12 |
# File 'lib/zapier_ruby/logger_decorator.rb', line 10 def error() super if enable_logging end |
#info(message) ⇒ Object
14 15 16 |
# File 'lib/zapier_ruby/logger_decorator.rb', line 14 def info() super if enable_logging end |