Class: Object

Inherits:
BasicObject
Defined in:
lib/pretty_debug.rb

Instance Method Summary collapse

Instance Method Details

#interceptObject



28
29
30
31
32
33
# File 'lib/pretty_debug.rb', line 28

def intercept; self ensure
	l = caller_location
	puts \
		"[Debug] #{"#{l.realpath}:#{l.lineno}"}".bf.color(:yellow),
		inspect.verbatim
end

#which(m) ⇒ Object



34
35
36
37
38
39
40
41
# File 'lib/pretty_debug.rb', line 34

def which m; self ensure
	l = caller_location
	m = :method_missing unless self.class.method_defined?(m)
	mt = method(m)
	puts \
		"[Debug] #{"#{l.realpath}:#{l.lineno}"}".bf.color(:yellow),
		"#{self.class}(#{mt.owner})\##{m}@#{mt.source_location.to_a.join(":")}"
end