Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/pretty_debug.rb
Instance Method Summary collapse
Instance Method Details
#expand ⇒ Object
215 |
# File 'lib/pretty_debug.rb', line 215 def ; inspect.verbatim end |
#intercept(&pr) ⇒ Object
209 210 211 212 213 214 |
# File 'lib/pretty_debug.rb', line 209 def intercept &pr tap do |x| puts \ "[Debug] #{caller_location(3).chain{|l| "#{l.path}:#{l.lineno}"}}".color(:yellow), (pr ? pr.call(x) : x).inspect.unchomp.verbatim end end |
#verbatim ⇒ Object
216 217 218 |
# File 'lib/pretty_debug.rb', line 216 def verbatim bg(:magenta) end |