class DEBUGGER__::LimitedPP
Attributes
buf[R]
Public Class Methods
new(max)
click to toggle source
# File debug-1.6.3/lib/debug/session.rb, line 2146 def initialize max @max = max @cnt = 0 @buf = String.new end
pp(obj, max=80)
click to toggle source
# File debug-1.6.3/lib/debug/session.rb, line 2136 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
<<(other)
click to toggle source
# File debug-1.6.3/lib/debug/session.rb, line 2152 def <<(other) @buf << other if @buf.size >= @max @buf = @buf[0..@max] + '...' throw self end end