Class: ArrayOfStoreState

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(store_state_sets) ⇒ ArrayOfStoreState

Returns a new instance of ArrayOfStoreState.



5
6
7
# File 'lib/array_of_store_state.rb', line 5

def initialize(store_state_sets)
  @store_state_sets = store_state_sets
end

Instance Attribute Details

#store_state_setsObject (readonly)

Returns the value of attribute store_state_sets.



4
5
6
# File 'lib/array_of_store_state.rb', line 4

def store_state_sets
  @store_state_sets
end

Class Method Details

.parse(xml) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/array_of_store_state.rb', line 9

def self.parse(xml)
  # debugger
  # doc = Nokogiri::XML(xml) 
  sets = xml.css("ArrayOfStoreState > StoreState").map do |storestate| 
    StoreStateSet.from_xml(storestate) 
  end 
  new(sets)
end