Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/pretty_debug.rb
Instance Method Summary collapse
Instance Method Details
#intercept(&pr) ⇒ Object
101 102 103 104 105 106 107 |
# File 'lib/pretty_debug.rb', line 101 def intercept &pr tap do |x| puts \ "[Debug] #{caller_location(3).chain{|l| "#{l.basename}:#{l.lineno}"}}" .color(:yellow), (pr ? pr.call(x) : x).inspect end end |