Class: ObjectSpace::AllocationSampler::Display::Stack

Inherits:
IO
  • Object
show all
Defined in:
lib/allocation_sampler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(output: $stdout) ⇒ Stack

Returns a new instance of Stack.



142
143
144
# File 'lib/allocation_sampler.rb', line 142

def initialize output: $stdout
  super(output)
end

Instance Attribute Details

#max_depthObject (readonly)

Returns the value of attribute max_depth.



140
141
142
# File 'lib/allocation_sampler.rb', line 140

def max_depth
  @max_depth
end

Instance Method Details

#show(frames) ⇒ Object



146
147
148
149
# File 'lib/allocation_sampler.rb', line 146

def show frames
  max_width = max_width(frames, 0, {})
  display(frames, 0, frames.total_samples, [], {}, max_width)
end