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, #next_sibling, #previous_sibling, #starts_with, #string, #string_length, #substring, #text

Instance Method Details

#and(expression) ⇒ Object Also known as: &



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

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

#equals(expression) ⇒ Object Also known as: ==



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

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

#inverseObject Also known as: ~



107
108
109
# File 'lib/xpath/dsl.rb', line 107

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

#is(expression) ⇒ Object



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

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

#normalizeObject Also known as: n



116
117
118
# File 'lib/xpath/dsl.rb', line 116

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

#one_of(*expressions) ⇒ Object



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

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

#or(expression) ⇒ Object Also known as: |



92
93
94
# File 'lib/xpath/dsl.rb', line 92

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

#string_literalObject



112
113
114
# File 'lib/xpath/dsl.rb', line 112

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

#union(*expressions) ⇒ Object Also known as: +



102
103
104
# File 'lib/xpath/dsl.rb', line 102

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

#where(expression) ⇒ Object Also known as: []



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

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