Module: XPath::DSL::ExpressionLevel

Includes:
TopLevel
Included in:
Expression
Defined in:
lib/xpath/dsl.rb

Instance Method Summary (collapse)

Methods included from TopLevel

#anywhere, #attr, #axis, #child, #contains, #css, #current, #descendant, #name, #starts_with, #string, #text

Instance Method Details

- (Object) and(expression) Also known as: &



79
80
81
# File 'lib/xpath/dsl.rb', line 79

def and(expression)
  Expression.new(:and, current, expression)
end

- (Object) equals(expression) Also known as: ==



69
70
71
# File 'lib/xpath/dsl.rb', line 69

def equals(expression)
  Expression.new(:equality, current, expression)
end

- (Object) inverse Also known as: ~



89
90
91
# File 'lib/xpath/dsl.rb', line 89

def inverse
  Expression.new(:inverse, current)
end

- (Object) next_sibling(*expressions)



61
62
63
# File 'lib/xpath/dsl.rb', line 61

def next_sibling(*expressions)
  Expression.new(:next_sibling, current, expressions)
end

- (Object) normalize Also known as: n



98
99
100
# File 'lib/xpath/dsl.rb', line 98

def normalize
  Expression.new(:normalized_space, current)
end

- (Object) one_of(*expressions)



65
66
67
# File 'lib/xpath/dsl.rb', line 65

def one_of(*expressions)
  Expression.new(:one_of, current, expressions)
end

- (Object) or(expression) Also known as: |



74
75
76
# File 'lib/xpath/dsl.rb', line 74

def or(expression)
  Expression.new(:or, current, expression)
end

- (Object) string_literal



94
95
96
# File 'lib/xpath/dsl.rb', line 94

def string_literal
  Expression.new(:string_literal, self)
end

- (Object) union(*expressions) Also known as: +



84
85
86
# File 'lib/xpath/dsl.rb', line 84

def union(*expressions)
  Union.new(*[self, expressions].flatten)
end

- (Object) where(expression) Also known as: []



56
57
58
# File 'lib/xpath/dsl.rb', line 56

def where(expression)
  Expression.new(:where, current, expression)
end