Class: ArrayOfStore

Inherits:
Object
  • Object
show all
Defined in:
lib/array_of_store.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_setsObject (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