Class: Logging::Logger
- Inherits:
-
Object
- Object
- Logging::Logger
- Defined in:
- lib/logging_adapter.rb
Instance Method Summary collapse
-
#initialize(name) ⇒ Logger
constructor
A new instance of Logger.
- #method_missing(method, *args, &block) ⇒ Object
- #respend_to?(method) ⇒ Boolean
Constructor Details
#initialize(name) ⇒ Logger
Returns a new instance of Logger.
4 5 6 |
# File 'lib/logging_adapter.rb', line 4 def initialize(name) @logger = ::Slf4r::LoggerFacade.new(name) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
12 13 14 |
# File 'lib/logging_adapter.rb', line 12 def method_missing(method, *args, &block) @logger.send(method, *args, &block) if @logger.respond_to?(method) end |
Instance Method Details
#respend_to?(method) ⇒ Boolean
16 17 18 |
# File 'lib/logging_adapter.rb', line 16 def respend_to?(method) @logger.respond_to?(method) end |