Class: Ambling::Data::BaseValueHolder
Overview
Holds an array of values
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
- #build_xml(builder) ⇒ Object
-
#initialize(data = [], attributes = {}) ⇒ BaseValueHolder
constructor
A new instance of BaseValueHolder.
- #push(item) ⇒ Object (also: #<<)
Methods inherited from Base
Constructor Details
#initialize(data = [], attributes = {}) ⇒ BaseValueHolder
Returns a new instance of BaseValueHolder.
79 80 81 82 |
# File 'lib/ambling/data.rb', line 79 def initialize(data = [], attributes = {}) self.values = data @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
77 78 79 |
# File 'lib/ambling/data.rb', line 77 def attributes @attributes end |
#values ⇒ Object
Returns the value of attribute values.
77 78 79 |
# File 'lib/ambling/data.rb', line 77 def values @values end |
Instance Method Details
#build_xml(builder) ⇒ Object
99 100 101 |
# File 'lib/ambling/data.rb', line 99 def build_xml(builder) @values.each { |value| value.build_xml(builder) } end |