Class: BacktrackXPath

Inherits:
Object
  • Object
show all
Defined in:
lib/backtrack-xpath.rb

Overview

file: backtrack-xpath.rb

Instance Method Summary collapse

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_sObject Also known as: to_xpath



11
12
13
# File 'lib/backtrack-xpath.rb', line 11

def to_s
  @xpath
end