Module: Appydave::Tools::Debuggable
- Defined in:
- lib/appydave/tools/debuggable.rb
Overview
Debuggable is a module for adding debug logging to classes
Instance Attribute Summary collapse
-
#debug ⇒ Object
Returns the value of attribute debug.
Instance Method Summary collapse
Instance Attribute Details
#debug ⇒ Object
Returns the value of attribute debug.
7 8 9 |
# File 'lib/appydave/tools/debuggable.rb', line 7 def debug @debug end |
Instance Method Details
#log_info(message) ⇒ Object
9 10 11 |
# File 'lib/appydave/tools/debuggable.rb', line 9 def log_info() log.info() if debug end |
#log_kv(key, value) ⇒ Object
13 14 15 |
# File 'lib/appydave/tools/debuggable.rb', line 13 def log_kv(key, value) log.kv(key, value) if debug end |
#log_subheading(message) ⇒ Object
17 18 19 |
# File 'lib/appydave/tools/debuggable.rb', line 17 def log_subheading() log.subheading() if debug end |