class HexaPDF::FiberWithLength
This special Fiber class should be used when the total length of the data yielded by the fiber is known beforehand. HexaPDF
uses this information to avoid unnecessary memory usage.
Attributes
length[R]
The total length of the data that will be yielded by this fiber. If the return value is negative the total length is not known.
Public Class Methods
new(length, &block)
click to toggle source
Initializes the Fiber and sets the length
.
Calls superclass method
# File lib/hexapdf/filter.rb, line 50 def initialize(length, &block) super(&block) @length = length || -1 end