Module: Kernel
- Defined in:
- lib/debug_print.rb
Instance Method Summary collapse
- #debug_print(object, options = {}) ⇒ Object (also: #dp)
Instance Method Details
#debug_print(object, options = {}) ⇒ Object Also known as: dp
33 34 35 36 37 38 39 |
# File 'lib/debug_print.rb', line 33 def debug_print(object, = {}) return if DebugPrint.silent print = [:printer] || DebugPrint.printer label = [:label] || 'DEBUG' puts "[#{label}: from #{caller.first}]" Kernel.send(print, object) end |