Class: Sevgi::Graphics::Content::CData
- Inherits:
-
Content
- Object
- Content
- Sevgi::Graphics::Content::CData
- Defined in:
- lib/sevgi/graphics/auxiliary/content.rb
Overview
CDATA section content.
Instance Method Summary collapse
-
#render(renderer, depth) ⇒ void
Renders CDATA content.
Instance Method Details
#render(renderer, depth) ⇒ void
This method returns an undefined value.
Renders CDATA content.
Embedded ]]> terminators are split across adjacent CDATA sections so the output remains valid XML.
77 78 79 80 81 82 83 |
# File 'lib/sevgi/graphics/auxiliary/content.rb', line 77 def render(renderer, depth) depth += 1 renderer.append(depth, "<![CDATA[") renderer.append(depth + 1, *Array(content).map { safe(it) }) renderer.append(depth, "]]>") end |