class DEBUGGER__::LimitedPP
Attributes
Public Class Methods
Source
# File bundled-src/debug-1.11.1/lib/debug/session.rb, line 2353 def initialize max @max = max @cnt = 0 @buf = String.new end
Source
# File bundled-src/debug-1.11.1/lib/debug/session.rb, line 2343 def self.pp(obj, max=80) out = self.new(max) catch out do PP.singleline_pp(obj, out) end out.buf end
Public Instance Methods
Source
# File bundled-src/debug-1.11.1/lib/debug/session.rb, line 2359 def <<(other) @buf << other if @buf.size >= @max @buf = @buf[0..@max] + '...' throw self end end