Class: SimpleDebugLogging
- Inherits:
-
Module
- Object
- Module
- SimpleDebugLogging
- Defined in:
- lib/simple_debug_logging.rb
Defined Under Namespace
Modules: ClassMethodLogger, InstanceMethodLoggerModulizer
Instance Method Summary collapse
- #included(base) ⇒ Object
-
#initialize(i_methods: nil) ⇒ SimpleDebugLogging
constructor
A new instance of SimpleDebugLogging.
Constructor Details
#initialize(i_methods: nil) ⇒ SimpleDebugLogging
Returns a new instance of SimpleDebugLogging.
41 42 43 |
# File 'lib/simple_debug_logging.rb', line 41 def initialize(i_methods: nil) @instance_methods_to_log = Array(i_methods) if i_methods end |
Instance Method Details
#included(base) ⇒ Object
44 45 46 47 48 |
# File 'lib/simple_debug_logging.rb', line 44 def included(base) instance_method_logger = InstanceMethodLoggerModulizer.to_mod(@instance_methods_to_log) base.send(:prepend, instance_method_logger) base.send(:extend, ClassMethodLogger) end |