Class: RXaal::Polyline
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from NodePrim
Instance Method Summary collapse
-
#initialize(doc, id = nil, elem_ns = nil) ⇒ Polyline
constructor
A new instance of Polyline.
- #xaal_serialize(parent) ⇒ Object
Methods inherited from NodePrim
Constructor Details
#initialize(doc, id = nil, elem_ns = nil) ⇒ Polyline
Returns a new instance of Polyline.
7 8 9 |
# File 'lib/polyline.rb', line 7 def initialize(doc, id = nil, elem_ns=nil) super(doc, id, elem_ns) end |
Instance Method Details
#xaal_serialize(parent) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/polyline.rb', line 11 def xaal_serialize(parent) polyline = Element.new "polyline" parent.elements << polyline superclass_serialize(polyline) if @depth != nil depth_e = Element.new "depth" depth_e.text = depth polyline << depth_e end if @closed != nil closed_e = Element.new "closed" closed_e.text = closed polyline.elements << closed_e end end |