Class: RXaal::Par

Inherits:
XaalElement show all
Defined in:
lib/par.rb

Instance Attribute Summary collapse

Attributes inherited from XaalElement

#doc, #id, #refs

Instance Method Summary collapse

Methods inherited from XaalElement

#add_attribute, #add_ref, get_new_default_id, modify_ref, #rm_ref, #superclass_serialize

Constructor Details

#initialize(doc) ⇒ Par

attr_accessor_of_class :change_style



6
7
8
9
10
# File 'lib/par.rb', line 6

def initialize(doc)
  super(doc)
  @show = ShowHide.new(true)
  @hide = ShowHide.new(false)
end

Instance Attribute Details

#hideObject (readonly)

Returns the value of attribute hide.



3
4
5
# File 'lib/par.rb', line 3

def hide
  @hide
end

#showObject (readonly)

Returns the value of attribute show.



3
4
5
# File 'lib/par.rb', line 3

def show
  @show
end

Instance Method Details

#xaal_serialize(parent) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/par.rb', line 12

def xaal_serialize(parent)
  e = Element.new "par"
  parent << e
  [:show, :hide].each {|sh|
    temp = self.send(sh)
    if temp.length > 0
      temp.xaal_serialize(e)
    end
  }
  
  superclass_serialize(e)
end