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