Class: MWS::Orders::Document
- Inherits:
-
Object
- Object
- MWS::Orders::Document
- Defined in:
- lib/mws/orders/document.rb
Overview
Wraps a Nokogiri node
Direct Known Subclasses
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
- #at_xpath(path) ⇒ Object
-
#initialize(node) ⇒ Document
constructor
A new instance of Document.
- #xpath(path) ⇒ Object
Constructor Details
#initialize(node) ⇒ Document
Returns a new instance of Document.
9 10 11 |
# File 'lib/mws/orders/document.rb', line 9 def initialize(node) @node = node end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
7 8 9 |
# File 'lib/mws/orders/document.rb', line 7 def node @node end |
Instance Method Details
#at_xpath(path) ⇒ Object
17 18 19 |
# File 'lib/mws/orders/document.rb', line 17 def at_xpath(path) node.at_xpath(add_namespace(path), namespaces) end |
#xpath(path) ⇒ Object
13 14 15 |
# File 'lib/mws/orders/document.rb', line 13 def xpath(path) node.xpath(add_namespace(path), namespaces) end |