Class: Object

Inherits:
BasicObject
Defined in:
lib/pretty_debug.rb

Instance Method Summary collapse

Instance Method Details

#expandObject



263
# File 'lib/pretty_debug.rb', line 263

def expand; inspect.verbatim end

#intercept(&pr) ⇒ Object



257
258
259
260
261
262
# File 'lib/pretty_debug.rb', line 257

def intercept &pr
	tap do |x| puts \
		"[Debug] #{caller_location(3).chain{|l| "#{l.path}:#{l.lineno}"}}".color(:yellow),
		(pr ? pr.call(x) : x).inspect.verbatim.unchomp
	end
end