class HexaPDF::FiberDoubleForString

Parent

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

alive?()

Returns true if resume has not yet been called.

length()

Returns the length in bytes of the wrapped string.

May only be called before resume!

resume()

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