Sha256: 25b23ce948dbac658779241f7dc6e6be4427ed481af3bfbdce3f7aa847345f6f
Contents?: true
Size: 445 Bytes
Versions: 2
Compression:
Stored size: 445 Bytes
Contents
require 'forwardable' require 'nokogiri' module Peddler class Response extend Forwardable attr :http_response def_delegator :http_response, :body def initialize(http_response) @http_response = http_response end def document Nokogiri::XML(body) end def result_node root = document.root path = root.name.sub('Response', 'Result') root.xpath("xmlns:#{path}") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
peddler-0.6.5 | lib/peddler/response.rb |
peddler-0.6.4 | lib/peddler/response.rb |