Class: XPath::Expression

Inherits:
Object
  • Object
show all
Includes:
DSL
Defined in:
lib/xpath/expression.rb

Constant Summary

Constants included from DSL

DSL::AXES, DSL::LOWERCASE_LETTERS, DSL::METHODS, DSL::OPERATORS, DSL::UPPERCASE_LETTERS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DSL

#anywhere, #attr, #axis, #binary_operator, #child, #contains_word, #css, #descendant, #ends_with, #function, #is, #last, #lowercase, #method, #next_sibling, #one_of, #position, #previous_sibling, #qname, #text, #union, #uppercase, #where

Constructor Details

#initialize(expression, *arguments) ⇒ Expression

Returns a new instance of Expression.



8
9
10
11
# File 'lib/xpath/expression.rb', line 8

def initialize(expression, *arguments)
  @expression = expression
  @arguments = arguments
end

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments.



5
6
7
# File 'lib/xpath/expression.rb', line 5

def arguments
  @arguments
end

#expressionObject

Returns the value of attribute expression.



5
6
7
# File 'lib/xpath/expression.rb', line 5

def expression
  @expression
end

Instance Method Details

#currentObject



13
14
15
# File 'lib/xpath/expression.rb', line 13

def current
  self
end

#to_xpath(type = nil) ⇒ Object Also known as: to_s



17
18
19
# File 'lib/xpath/expression.rb', line 17

def to_xpath(type = nil)
  Renderer.render(self, type)
end