Class: ArrayOfStore
- Inherits:
-
Object
- Object
- ArrayOfStore
- Defined in:
- lib/array_of_store.rb
Instance Attribute Summary collapse
-
#store_sets ⇒ Object
readonly
Returns the value of attribute store_sets.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(store_sets) ⇒ ArrayOfStore
constructor
A new instance of ArrayOfStore.
Constructor Details
#initialize(store_sets) ⇒ ArrayOfStore
Returns a new instance of ArrayOfStore.
5 6 7 |
# File 'lib/array_of_store.rb', line 5 def initialize(store_sets) @store_sets = store_sets end |
Instance Attribute Details
#store_sets ⇒ Object (readonly)
Returns the value of attribute store_sets.
4 5 6 |
# File 'lib/array_of_store.rb', line 4 def store_sets @store_sets end |
Class Method Details
.parse(xml) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/array_of_store.rb', line 9 def self.parse(xml) sets = xml.css("ArrayOfStore > Store").map do |store| StoreSet.from_xml(store) end new(sets) end |