Class: XPath::Expression::Or

Inherits:
Binary show all
Defined in:
lib/xpath/expression.rb

Constant Summary

Constants included from XPath

VERSION

Instance Method Summary collapse

Methods inherited from Binary

#initialize

Methods inherited from XPath::Expression

#and, #apply, #current, #equals, #inverse, #is, #next_sibling, #normalize, #one_of, #or, #string, #string_literal, #to_s, #to_xpaths, #union, #where, #wrap_xpath

Methods included from XPath

#anywhere, #attr, #child, #contains, #current, #descendant, generate, #name, #text, #var, #varstring

Constructor Details

This class inherits a constructor from XPath::Expression::Binary

Instance Method Details

#to_xpath(predicate = nil) ⇒ Object



145
146
147
# File 'lib/xpath/expression.rb', line 145

def to_xpath(predicate=nil)
  "(#{@left.to_xpath(predicate)} or #{@right.to_xpath(predicate)})"
end