Class: Object

Inherits:
BasicObject
Defined in:
lib/pretty_debug.rb,
lib/pretty_debug.rb

Overview

Terminal

Instance Method Summary collapse

Instance Method Details

#expandObject



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

def expand; inspect.verbatim end

#interceptObject



25
26
27
28
29
30
31
# File 'lib/pretty_debug.rb', line 25

def intercept
	l = caller_location
	tap do |x| puts \
		"[Debug] #{"#{l.path}:#{l.lineno}"}".bf.color(:yellow),
		x.inspect.verbatim
	end
end

#which(m) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/pretty_debug.rb', line 32

def which m
	l = caller_location
	tap do |x| puts \
		"[Debug] #{"#{l.path}:#{l.lineno}"}".bf.color(:yellow),
		"#{x.class}##{m}@#{x.method(m).source_location.join(":")}"
	end
end