Class: HecksLogger
- Inherits:
-
Object
- Object
- HecksLogger
- Defined in:
- lib/logger.rb
Overview
Simple logger
Instance Method Summary collapse
-
#initialize(output: []) ⇒ HecksLogger
constructor
A new instance of HecksLogger.
- #method_missing(name, *args, &block) ⇒ Object
- #respond_to?(name) ⇒ Boolean
Constructor Details
#initialize(output: []) ⇒ HecksLogger
Returns a new instance of HecksLogger.
5 6 7 |
# File 'lib/logger.rb', line 5 def initialize(output: []) @output = output end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
9 10 11 |
# File 'lib/logger.rb', line 9 def method_missing(name, *args, &block) @output << {name: name, command: args.first.to_h.to_s}.to_s end |
Instance Method Details
#respond_to?(name) ⇒ Boolean
13 14 15 |
# File 'lib/logger.rb', line 13 def respond_to?(name) true end |