Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/pretty_debug.rb
Instance Method Summary collapse
Instance Method Details
#expand ⇒ Object
246 |
# File 'lib/pretty_debug.rb', line 246 def ; inspect.verbatim end |
#intercept(&pr) ⇒ Object
240 241 242 243 244 245 |
# File 'lib/pretty_debug.rb', line 240 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
247 248 249 |
# File 'lib/pretty_debug.rb', line 247 def verbatim bg(:magenta) end |