Module: Sevgi::Derender::Elements::Any Private
- Included in:
- Root
- Defined in:
- lib/sevgi/derender/elements/any.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Default element strategy for ordinary SVG/XML elements.
Instance Method Summary collapse
-
#decompile ⇒ Array<String>
private
Converts this node into unformatted Sevgi DSL lines.
Instance Method Details
#decompile ⇒ Array<String>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Converts this node into unformatted Sevgi DSL lines.
11 12 13 14 15 16 17 |
# File 'lib/sevgi/derender/elements/any.rb', line 11 def decompile(*) if children.any? children.one? && children.first.node.text? ? Array(leaf(has_attributes: attributes.any?)) : tree else Array(leaf(has_content: false)) end end |