Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/pretty_debug.rb
Instance Method Summary collapse
Instance Method Details
#expand ⇒ Object
264 |
# File 'lib/pretty_debug.rb', line 264 def ; inspect.verbatim end |
#intercept(&pr) ⇒ Object
257 258 259 260 261 262 263 |
# File 'lib/pretty_debug.rb', line 257 def intercept &pr l = caller_location(3) tap do |x| puts \ "[Debug] #{"#{l.path}:#{l.lineno}"}".color(:yellow), (pr ? pr.call(x) : x).inspect.verbatim.unchomp end end |