Sha256: c4018e5f18f1ea7bf7539a638c8f2265c4868f0b2e29f1ef6c8acdd4beac1d62

Contents?: true

Size: 374 Bytes

Versions: 1

Compression:

Stored size: 374 Bytes

Contents

module MWS
  module Orders
    class Document
      attr_reader :node

      def initialize(node)
        @node = node
      end

      def xpath(path)
        node.xpath(add_namespace(path))
      end

      private

      def add_namespace(path)
        path
          .split('/')
          .map { |attr| "xmlns:#{attr}" }
          .join('/')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mws-orders-0.2.2 lib/mws/orders/document.rb