Class: RubyDep::NullLogger
- Inherits:
-
Object
- Object
- RubyDep::NullLogger
- Defined in:
- lib/ruby_dep/logger.rb
Overview
Shamelessly stolen from github.com/karafka/null-logger
Constant Summary collapse
- LOG_LEVELS =
%w(unknown fatal error warn info debug).freeze
Instance Method Summary collapse
- #method_missing(method_name, *args, &block) ⇒ Object
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
26 27 28 |
# File 'lib/ruby_dep/logger.rb', line 26 def method_missing(method_name, *args, &block) LOG_LEVELS.include?(method_name.to_s) ? nil : super end |
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
22 23 24 |
# File 'lib/ruby_dep/logger.rb', line 22 def respond_to_missing?(method_name, include_private = false) LOG_LEVELS.include?(method_name.to_s) || super end |