Class: RXaal::Stroke
- Inherits:
-
XaalElement
- Object
- XaalElement
- RXaal::Stroke
- Includes:
- Serializable
- Defined in:
- lib/stroke.rb
Instance Attribute Summary
Attributes inherited from XaalElement
Instance Method Summary collapse
-
#initialize(doc, id = nil, elem_ns = nil) ⇒ Stroke
constructor
A new instance of Stroke.
- #xaal_serialize(parent) ⇒ Object
Methods inherited from XaalElement
#add_attribute, #add_ref, get_new_default_id, modify_ref, #rm_ref, #superclass_serialize
Constructor Details
#initialize(doc, id = nil, elem_ns = nil) ⇒ Stroke
Returns a new instance of Stroke.
8 9 10 |
# File 'lib/stroke.rb', line 8 def initialize(doc, id = nil, elem_ns=nil) super(doc, id, elem_ns) end |
Instance Method Details
#xaal_serialize(parent) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/stroke.rb', line 12 def xaal_serialize(parent) if (@type != nil || @width != nil) e = REXML::Element.new "stroke" parent.elements << e if @type != nil e.attributes["type"] = @type end if @width != nil e.attributes["width"] = @width end end end |