Class: Sumi::Graphics::Content::Verbatim

Inherits:
Content
  • Object
show all
Defined in:
graphics/lib/sumi/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



254
# File 'graphics/lib/sumi/graphics/auxiliary/content.rb', line 254

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

#to_s ⇒ String

Returns validated verbatim content.

Returns:

  • (String)


248
# File 'graphics/lib/sumi/graphics/auxiliary/content.rb', line 248

def to_s = XML.text(payload)