class Reactor::XPathExtractor
Public Class Methods
new(node)
click to toggle source
# File lib/reactor/tools/xpath_extractor.rb, line 3 def initialize(node) @node = node end
Public Instance Methods
match(expr)
click to toggle source
# File lib/reactor/tools/xpath_extractor.rb, line 7 def match(expr) arr = REXML::XPath.match(@node, expr) return arr.first if arr.length == 1 return arr end