class HexaPDF::FiberDoubleForString


Implements part of the Fiber interface so that it can be used instead of a Fiber by HexaPDF when only a single string should be returned.

Public Class Methods

new(str = nil, &block)

Creates a new FiberDoubleForString instance for the given string str or for the string returned by invoking the block.

Public Instance Methods


Returns true if resume has not yet been called.


Returns the length in bytes of the wrapped string.

May only be called before resume!


Returns the wrapped string on the first invocation, nil otherwise.