class HeapInfo::Chunks
Self-defined array for collecting chunk(s).
Public Class Methods
new()
click to toggle source
Instantiate a {HeapInfo::Chunks} object.
# File lib/heapinfo/chunks.rb, line 6 def initialize @chunks = [] end
Public Instance Methods
<<(val)
click to toggle source
@return [void]
# File lib/heapinfo/chunks.rb, line 11 def <<(val) @chunks << val end
each(&block)
click to toggle source
@return [void]
# File lib/heapinfo/chunks.rb, line 21 def each(&block) @chunks.each(&block) end
size()
click to toggle source
@return [Integer]
# File lib/heapinfo/chunks.rb, line 16 def size @chunks.size end
to_s()
click to toggle source
Hook #to_s
for pretty printing. @return [String]
# File lib/heapinfo/chunks.rb, line 27 def to_s @chunks.map(&:to_s).join("\n") end