Module: Kernel

Defined in:
lib/debug_print.rb

Instance Method Summary collapse

Instance Method Details

#debug_print(object, options = {}) ⇒ Object Also known as: dp



33
34
35
36
37
38
# File 'lib/debug_print.rb', line 33

def debug_print(object, options = {})
  return if DebugPrint.silent
  print = options[:printer] || DebugPrint.printer
  puts "[DEBUG: from #{caller.first}]"
  Kernel.send(print, object)
end