Class: ContextSpook::TOON::Encoder::StringArray

Inherits:
Array
  • Object
show all
Defined in:
lib/context_spook/toon/encoder.rb

Overview

A private Array subclass that accumulates output lines and provides a string method to join them with newlines, serving as the internal buffer when no external IO is specified for streaming output.

Instance Method Summary collapse

Instance Method Details

#string ⇒ String

Joins all accumulated lines in the array into a single string, separating each line with a newline character.

This method provides the final string representation of the internally accumulated output, serving as the terminal step in the encoding pipeline when no external IO stream is provided.

Returns:

  • (String) —

    the fully joined string representation of the accumulated array elements



52
53
54
# File 'lib/context_spook/toon/encoder.rb', line 52

def string
  self * ?\n
end