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.



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

def initialize output: $stdout
  super(output)
end

Instance Attribute Details

#max_depthObject (readonly)

Returns the value of attribute max_depth.



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

def max_depth
  @max_depth
end

Instance Method Details

#show(frames) ⇒ Object



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

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