Class: ZammadAPI::Log
- Inherits:
-
Object
- Object
- ZammadAPI::Log
- Defined in:
- lib/zammad_api/log.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ Log
constructor
A new instance of Log.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(config) ⇒ Log
Returns a new instance of Log.
4 5 6 7 8 9 10 |
# File 'lib/zammad_api/log.rb', line 4 def initialize(config) return if !config[:logger] require 'logger' @logger = Logger.new($stderr) #@logger.level = Logger::WARN @logger.level = Logger::DEBUG end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
12 13 14 15 |
# File 'lib/zammad_api/log.rb', line 12 def method_missing(method, *args) return if !@logger @logger.send(method, args) end |