Module: Sevgi::Graphics::Mixtures::Render
- Defined in:
- lib/sevgi/graphics/mixtures/render.rb
Overview
DSL helpers for rendering SVG documents and children.
Instance Method Summary collapse
-
#Render(**options) ⇒ String
Renders this element as SVG source.
-
#RenderChildren(separator = "\n\n", **options) ⇒ String
Renders only this element's children.
Instance Method Details
#Render(**options) ⇒ String
377 |
# File 'lib/sevgi/graphics/mixtures/render.rb', line 377 def Render(**) = Renderer.(self, **) |
#RenderChildren(separator = "\n\n", **options) ⇒ String
Renders only this element's children. Child render output omits document preambles and preserves each child's text whitespace and inline mixed-content formatting.
392 393 394 395 396 397 398 |
# File 'lib/sevgi/graphics/mixtures/render.rb', line 392 def RenderChildren(separator = "\n\n", **) ArgumentError.("SVG fragment separator must be a String") unless separator.is_a?(::String) separator = XML.text(separator, context: "SVG fragment separator") Renderer.send(:validate, **) children.map { Renderer.fragment(it, **) }.join(separator) end |