Class: Object

Inherits:
BasicObject
Defined in:
lib/pretty_debug.rb

Instance Method Summary collapse

Instance Method Details

#expandObject



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

def expand; inspect.verbatim end

#intercept(&pr) ⇒ Object



245
246
247
248
249
250
# File 'lib/pretty_debug.rb', line 245

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