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
39
# File 'lib/debug_print.rb', line 33

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