Class: Sevgi::Graphics::Content::Verbatim

Inherits:
Content
  • Object
show all
Defined in:
lib/sevgi/graphics/auxiliary/content.rb

Overview

Verbatim content backed by an immutable payload snapshot. Mutable leaf objects are stringified during construction. Verbatim content bypasses XML escaping; validation guarantees encoding and legal XML 1.0 code points, not well-formed markup supplied by the caller.

See Also:

Instance Method Summary collapse

Instance Method Details

#render(renderer, depth) ⇒ Object

Renders verbatim content.

Parameters:

  • renderer (#append)

    rendering output collaborator

  • depth (Integer)

    current render depth

Returns:

  • (Object)

    ignored by the rendering engine



296
# File 'lib/sevgi/graphics/auxiliary/content.rb', line 296

def render(renderer, depth) = renderer.append(depth + 1, to_s)

#to_sString

Returns validated verbatim content.

Returns:

  • (String)


290
# File 'lib/sevgi/graphics/auxiliary/content.rb', line 290

def to_s = XML.text(payload)