Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/pretty_debug.rb
Instance Method Summary collapse
Instance Method Details
#expand ⇒ Object
231 |
# File 'lib/pretty_debug.rb', line 231 def ; inspect.verbatim end |
#intercept(&pr) ⇒ Object
225 226 227 228 229 230 |
# File 'lib/pretty_debug.rb', line 225 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
232 233 234 |
# File 'lib/pretty_debug.rb', line 232 def verbatim bg(:magenta) end |