Class: BacktrackXPath
- Inherits:
-
Object
- Object
- BacktrackXPath
- Defined in:
- lib/backtrack-xpath.rb
Overview
file: backtrack-xpath.rb
Instance Method Summary collapse
-
#initialize(node) ⇒ BacktrackXPath
constructor
A new instance of BacktrackXPath.
- #to_s ⇒ Object (also: #to_xpath)
Constructor Details
#initialize(node) ⇒ BacktrackXPath
Returns a new instance of BacktrackXPath.
7 8 9 |
# File 'lib/backtrack-xpath.rb', line 7 def initialize(node) @xpath = doc_scan(node).flatten.compact.join('/') end |
Instance Method Details
#to_s ⇒ Object Also known as: to_xpath
11 12 13 |
# File 'lib/backtrack-xpath.rb', line 11 def to_s @xpath end |