Class: Laximo::Respond::GetWizardNextStep2

Inherits:
Base
  • Object
show all
Defined in:
lib/laximo/respond/oem/get_wizard_next_step2.rb

Constant Summary

Constants inherited from Base

Base::RESPONSE_LOGIN_RESULT, Base::RESPONSE_RESULT, Base::RESPONSE_SOAP_ERROR

Class Method Summary collapse

Methods inherited from Base

#error, #failure?, #initialize, #result, #result!, #success?

Constructor Details

This class inherits a constructor from Laximo::Respond::Base

Class Method Details

.parsing_result(str) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/laximo/respond/oem/get_wizard_next_step2.rb', line 8

def self.parsing_result(str)

  str.xpath('//GetWizardNextStep2').inject([]) { |arr, node|

    h = {}

    h[:previous_step] = nodes_to_hash(node.xpath('./previousStep/row'))
    h[:currentStep]   = node_to_hash(node.xpath('./currentStep')[0]) { |h1, n2|
      h1[:options] = nodes_to_hash(n2.xpath('./options/row'))
    }

    arr << h

  }

end