Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/pretty_debug.rb,
lib/pretty_debug.rb
Overview
Terminal
Instance Method Summary collapse
Instance Method Details
#expand ⇒ Object
221 |
# File 'lib/pretty_debug.rb', line 221 def ; inspect.verbatim end |
#intercept ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/pretty_debug.rb', line 25 def intercept l = caller_location tap do puts \ "[Debug] #{"#{l.path}:#{l.lineno}"}".bf.color(:yellow), inspect.verbatim end end |
#which(m) ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/pretty_debug.rb', line 32 def which m l = caller_location m = :method_missing unless self.class.method_defined?(m) mt = method(m) tap do puts \ "[Debug] #{"#{l.path}:#{l.lineno}"}".bf.color(:yellow), "#{self.class}(#{mt.owner})##{m}@#{mt.source_location.to_a.join(":")}" end end |