Class: XPath::Expression::Literal

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

Constant Summary

Constants included from XPath

VERSION

Instance Method Summary collapse

Methods inherited from XPath::Expression

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

Methods included from XPath

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

Constructor Details

#initialize(expression) ⇒ Literal

Returns a new instance of Literal.



32
33
34
# File 'lib/xpath/expression.rb', line 32

def initialize(expression)
  @expression = expression
end

Instance Method Details

#to_xpath(predicate = nil) ⇒ Object



36
37
38
# File 'lib/xpath/expression.rb', line 36

def to_xpath(predicate=nil)
  @expression.to_s
end