class MWS::MerchantFulfillment::Document

Attributes

node[R]

Public Class Methods

new(node) click to toggle source
# File lib/mws/merchant_fulfillment/document.rb, line 8
def initialize(node)
  @node = node
end

Public Instance Methods

xpath(path) click to toggle source
# File lib/mws/merchant_fulfillment/document.rb, line 12
def xpath(path)
  node.xpath(add_namespace(path))
end

Private Instance Methods

add_namespace(path) click to toggle source
# File lib/mws/merchant_fulfillment/document.rb, line 18
def add_namespace(path)
  path.
    split('/').
    map { |attr| "xmlns:#{attr}" }.
    join('/')
end