2010-12-27 10:56:55 +00:00
|
|
|
class Pry
|
2011-01-19 08:40:43 +00:00
|
|
|
|
|
|
|
# The default print object - only show first line of backtrace and
|
|
|
|
# prepend output with `=>`
|
2010-12-27 10:56:55 +00:00
|
|
|
DEFAULT_PRINT = proc do |output, value|
|
|
|
|
case value
|
|
|
|
when Exception
|
|
|
|
output.puts "#{value.class}: #{value.message}"
|
2010-12-27 11:45:47 +00:00
|
|
|
output.puts "from #{value.backtrace.first}"
|
2010-12-27 10:56:55 +00:00
|
|
|
else
|
|
|
|
output.puts "=> #{Pry.view(value)}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|