class DEBUGGER__::LimitedPP

Attributes

buf[R]

Public Class Methods

new(max) click to toggle source
# File debug-1.7.1/lib/debug/session.rb, line 2300
def initialize max
  @max = max
  @cnt = 0
  @buf = String.new
end
pp(obj, max=80) click to toggle source
# File debug-1.7.1/lib/debug/session.rb, line 2290
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.7.1/lib/debug/session.rb, line 2306
def <<(other)
  @buf << other

  if @buf.size >= @max
    @buf = @buf[0..@max] + '...'
    throw self
  end
end