Class: RXaal::ShowHide
- Inherits:
-
BoundArray
- Object
- BoundArray
- RXaal::ShowHide
- Includes:
- Serializable
- Defined in:
- lib/show_hide.rb
Instance Attribute Summary collapse
-
#show ⇒ Object
readonly
Returns the value of attribute show.
Attributes inherited from BoundArray
Instance Method Summary collapse
-
#initialize(show) ⇒ ShowHide
constructor
A new instance of ShowHide.
- #xaal_serialize(parent) ⇒ Object
Methods inherited from BoundArray
Constructor Details
#initialize(show) ⇒ ShowHide
Returns a new instance of ShowHide.
10 11 12 13 |
# File 'lib/show_hide.rb', line 10 def initialize(show) super(XaalElement) @show = show end |
Instance Attribute Details
#show ⇒ Object (readonly)
Returns the value of attribute show.
7 8 9 |
# File 'lib/show_hide.rb', line 7 def show @show end |
Instance Method Details
#xaal_serialize(parent) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/show_hide.rb', line 15 def xaal_serialize(parent) e_name = @show ? "show" : "hide" e = Element.new e_name parent.elements << e e.attributes["type"] = @type each { |obj| t_obj = Element.new "object_ref" t_obj.attributes["id"] = obj.id e.elements << t_obj } end |