Sha256: 903f3f3672b3348a23229f38d3ac0dbc6d3f6cd9c2ff48deab2ba651dda27c5e

Contents?: true

Size: 675 Bytes

Versions: 12

Compression:

Stored size: 675 Bytes

Contents

# encoding: utf-8
module Laximo

  module Respond

    class ListCatalogs < Laximo::Respond::Base

      def 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?

        }

      end # parsing_result

    end # ListCatalogs

  end # Respond

end # Laximo

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
laximo-0.7 lib/laximo/respond/list_catalogs.rb
laximo-0.6.5.1 lib/laximo/respond/list_catalogs.rb
laximo-0.6.5 lib/laximo/respond/list_catalogs.rb
laximo-0.6.4 lib/laximo/respond/list_catalogs.rb
laximo-0.6.3 lib/laximo/respond/list_catalogs.rb
laximo-0.6.2 lib/laximo/respond/list_catalogs.rb
laximo-0.6.1 lib/laximo/respond/list_catalogs.rb
laximo-0.6.0 lib/laximo/respond/list_catalogs.rb
laximo-0.5.2 lib/laximo/respond/list_catalogs.rb
laximo-0.5.1 lib/laximo/respond/list_catalogs.rb
laximo-0.5.0 lib/laximo/respond/list_catalogs.rb
laximo-0.4.2 lib/laximo/respond/list_catalogs.rb