module Spruz::P

Private Instance Methods

p!(*objs) click to toggle source

Raise a runtime error with the inspected objects objs (obtained by calling the inspect method) as their message text. This is useful for quick debugging.

# File lib/spruz/p.rb, line 10
def p!(*objs)
  raise((objs.size < 2 ? objs.first : objs).inspect)
end
pp!(*objs) click to toggle source

Raise a runtime error with the inspected objects objs (obtained by calling the pretty_inspect method) as their message text. This is useful for quick debugging.

# File lib/spruz/p.rb, line 17
def pp!(*objs)
  raise("\n" + (objs.size < 2 ? objs.first : objs).pretty_inspect.chomp)
end