Class: RXaal::Text

Inherits:
NodePrim show all
Defined in:
lib/text.rb

Instance Attribute Summary

Attributes inherited from NodePrim

#coordinates

Instance Method Summary collapse

Methods inherited from NodePrim

#superclass_serialize

Constructor Details

#initializeText

Returns a new instance of Text.



8
9
10
# File 'lib/text.rb', line 8

def initialize
  super
end

Instance Method Details

#xaal_serialize(parent) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/text.rb', line 13

def xaal_serialize(parent)
  text = Element.new "text"
  parent.elements << text
  
  if @alignment != nil
    e_align = Element.new "alignment"
    e_align.text = alignment
    text << e_align
  end
 
  if @boxed != nil
    e_boxed = Element.new "boxed"
    e_boxed.text = boxed.to_s
  end
  
  contents.xaal_serialize(text)
  
  superclass_serialize(text)
end