Class: Laximo::Respond::ListCatalogs
- Defined in:
- lib/laximo/respond/oem/list_catalogs.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 24 25 26 27 28 29 |
# File 'lib/laximo/respond/oem/list_catalogs.rb', line 8 def self.parsing_result(str) str.xpath('//ListCatalogs/row').inject([]) { |arr, node| h = node_to_hash(node) h[:features] = nodes_to_hash(node.xpath('./features/feature')) h[:operations] = node.xpath('./extensions/operations/opration').inject([]) { |arr1, n1| h1 = node_to_hash(n1) h1[:params] = nodes_to_hash(n1.xpath('./params/param')) arr1 << h1 } arr << h unless h.empty? arr } end |