Class: Sumi::Graphics::Content::Encoded
- Inherits:
-
Content
- Object
- Content
- Sumi::Graphics::Content::Encoded
- Defined in:
- graphics/lib/sumi/graphics/auxiliary/content.rb
Overview
XML text-encoded content backed by an immutable payload snapshot. Mutable leaf objects are stringified during construction, before XML escaping.
Instance Method Summary collapse
-
#render(renderer, depth) ⇒ Object
Renders encoded text content.
-
#to_s ⇒ String
Returns XML text-encoded content.
Instance Method Details
#render(renderer, depth) ⇒ Object
Renders encoded text content.
238 |
# File 'graphics/lib/sumi/graphics/auxiliary/content.rb', line 238 def render(renderer, depth) = renderer.append(depth + 1, to_s) |
#to_s ⇒ String
Returns XML text-encoded content.
232 |
# File 'graphics/lib/sumi/graphics/auxiliary/content.rb', line 232 def to_s = XML.text(payload).encode(xml: :text).gsub("\r", " ") |