Class: MWS::Feeds::Document
- Inherits:
-
Object
- Object
- MWS::Feeds::Document
- Defined in:
- lib/mws/feeds/document.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
-
#initialize(node, namespace: 'xmlns') ⇒ Document
constructor
A new instance of Document.
- #xpath(path) ⇒ Object
Constructor Details
#initialize(node, namespace: 'xmlns') ⇒ Document
Returns a new instance of Document.
9 10 11 12 |
# File 'lib/mws/feeds/document.rb', line 9 def initialize(node, namespace: 'xmlns') @node = node @namespace = namespace end |
Instance Attribute Details
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
7 8 9 |
# File 'lib/mws/feeds/document.rb', line 7 def namespace @namespace end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
6 7 8 |
# File 'lib/mws/feeds/document.rb', line 6 def node @node end |
Instance Method Details
#xpath(path) ⇒ Object
14 15 16 |
# File 'lib/mws/feeds/document.rb', line 14 def xpath(path) node.xpath(add_namespace(path)) end |