Class: AwesomeXML::NodeXPath
- Inherits:
-
Object
- Object
- AwesomeXML::NodeXPath
- Defined in:
- lib/awesome_xml/node_xpath.rb
Instance Method Summary collapse
-
#initialize(node_name, options) ⇒ NodeXPath
constructor
Initialize this class by providing the name of the ‘AwesomeXML` node and an options hash.
-
#xpath ⇒ Object
Returns a String representing an XPath built from the options passed in at initialization time.
Constructor Details
#initialize(node_name, options) ⇒ NodeXPath
Initialize this class by providing the name of the ‘AwesomeXML` node and an options hash. For more information on how the options work, please refer to the README.
11 12 13 14 |
# File 'lib/awesome_xml/node_xpath.rb', line 11 def initialize(node_name, ) @node_name = node_name @options = end |
Instance Method Details
#xpath ⇒ Object
Returns a String representing an XPath built from the options passed in at initialization time.
17 18 19 |
# File 'lib/awesome_xml/node_xpath.rb', line 17 def xpath [:xpath] || xpath_by_tag_type end |