Sha256: 41e39746e3a92ebe71e738dd1ef767a320b8c4f526ea15b9af3ad8fa8094c34f
Contents?: true
Size: 672 Bytes
Versions: 1
Compression:
Stored size: 672 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
laximo-0.4.1 | lib/laximo/respond/list_catalogs.rb |