Class: ArrayOfStoreState
- Inherits:
-
Object
- Object
- ArrayOfStoreState
- Defined in:
- lib/array_of_store_state.rb
Instance Attribute Summary collapse
-
#store_state_sets ⇒ Object
readonly
Returns the value of attribute store_state_sets.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(store_state_sets) ⇒ ArrayOfStoreState
constructor
A new instance of ArrayOfStoreState.
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_sets ⇒ Object (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 |