Sha256: b5cd58634d263387a9397de11a2b208096de4b551292ba533782b3bf89eae3f6

Contents?: true

Size: 456 Bytes

Versions: 2

Compression:

Stored size: 456 Bytes

Contents

# encoding: utf-8
module Laximo

  module Respond

    class ListUnits < Laximo::Respond::Base

      def parsing_result(str)

        str.xpath('//ListUnits/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 # parsing_result

    end # ListUnits

  end # Respond

end # Laximo

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
laximo-0.8.1 lib/laximo/respond/oem/list_units.rb
laximo-0.8 lib/laximo/respond/oem/list_units.rb