Class: Ea::Svg::EaEmitter::Layer
- Inherits:
-
Struct
- Object
- Struct
- Ea::Svg::EaEmitter::Layer
- Defined in:
- lib/ea/svg/ea_emitter/layer.rb
Overview
A single <g> block ready for inclusion in the SVG output.
Carries the style string and the body (one or more child
elements: <path>, <polygon>, <text>, <rect>).
Emitters return Arrays of Layer objects. The Document
orchestrator either joins them as-is (per-entity ordering)
or buckets them by style_key for EA-style grouped output.
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#style ⇒ Object
Returns the value of attribute style.
-
#style_key ⇒ Object
Returns the value of attribute style_key.
Instance Method Summary collapse
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
13 14 15 |
# File 'lib/ea/svg/ea_emitter/layer.rb', line 13 def body @body end |
#style ⇒ Object
Returns the value of attribute style
13 14 15 |
# File 'lib/ea/svg/ea_emitter/layer.rb', line 13 def style @style end |
#style_key ⇒ Object
Returns the value of attribute style_key
13 14 15 |
# File 'lib/ea/svg/ea_emitter/layer.rb', line 13 def style_key @style_key end |
Instance Method Details
#to_svg ⇒ Object
14 15 16 |
# File 'lib/ea/svg/ea_emitter/layer.rb', line 14 def to_svg %(<g style="#{style}">\n#{body}\n</g>) end |