Class: Laximo::Respond::ListDetailByUnit

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

Constant Summary

Constants inherited from Base

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

Instance Method Summary collapse

Methods inherited from Base

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

Constructor Details

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

Instance Method Details

#parsing_result(str) ⇒ Object



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

def parsing_result(str)

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

    h = node_to_hash(node) { |h1, n1|
      h1[:attributes] = nodes_to_hash(n1.xpath('./attribute'))
    }

    arr << h unless h.empty?

  }

end