class Laximo::Respond::GetVehicleInfo

Public Class Methods

parsing_result(str) click to toggle source
# File lib/laximo/respond/oem/get_vehicle_info.rb, line 8
def self.parsing_result(str)

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

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

    arr << h unless h.empty?
    arr

  }

end