Sha256: 1c74f3e879f8dbb499caa42358d85d9214a14c0e9dfd0b3b4d13c36bb1885c32
Contents?: true
Size: 689 Bytes
Versions: 2
Compression:
Stored size: 689 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? arr } end # parsing_result end # ListCatalogs 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_catalogs.rb |
laximo-0.8 | lib/laximo/respond/oem/list_catalogs.rb |