module Kernel

Public Instance Methods

dap(object, options = {}) click to toggle source
# File lib/debug_print.rb, line 49
def dap(object, options = {})
  debug_print(object, options.merge({printer: :ap}))
end
debug_print(object, options = {}) click to toggle source
# 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
Also aliased as: dp
dp(object, options = {})
Alias for: debug_print
dpp(object, options = {}) click to toggle source
# File lib/debug_print.rb, line 45
def dpp(object, options = {})
  debug_print(object, options.merge({printer: :pp}))
end
dputs(object, options = {}) click to toggle source
# File lib/debug_print.rb, line 41
def dputs(object, options = {})
  debug_print(object, options.merge({printer: :puts}))
end