# File lib/xpath.rb, line 30 def anywhere(expression) Expression::Anywhere.new(expression) end
# File lib/xpath.rb, line 34 def attr(expression) Expression::Attribute.new(current, expression) end
# File lib/xpath.rb, line 26 def child(*expressions) Expression::Child.new(current, expressions) end
# File lib/xpath.rb, line 38 def contains(expression) Expression::Contains.new(current, expression) end
# File lib/xpath.rb, line 58 def css(selector) paths = Nokogiri::CSS.xpath_for(selector).map do |selector| Expression::CSS.new(current, Expression::Literal.new(selector)) end Union.new(*paths) end
# File lib/xpath.rb, line 22 def descendant(*expressions) Expression::Descendant.new(current, expressions) end
# File lib/xpath.rb, line 18 def name Expression::Name.new(current) end
# File lib/xpath.rb, line 50 def string Expression::StringFunction.new(current) end
# File lib/xpath.rb, line 54 def tag(name) Expression::Tag.new(name) end
# File lib/xpath.rb, line 42 def text Expression::Text.new(current) end
Generated with the Darkfish Rdoc Generator 2.