Module: XPath::DSL::TopLevel

### Home Classes Methods

### In Files

- lib/xpath/dsl.rb

### Methods

- #anywhere
- #attr
- #axis
- #child
- #contains
- #css
- #current
- #descendant
- #name
- #next_sibling
- #previous_sibling
- #starts_with
- #string
- #text

### Class/Module Index

Quicksearch

- XPath
- XPath::DSL
- XPath::DSL::ExpressionLevel
- XPath::DSL::TopLevel
- XPath::Expression
- XPath::HTML
- XPath::Literal
- XPath::Renderer
- XPath::Union

No matching classes.

# XPath::DSL::TopLevel

### Public Instance Methods

anywhere(*expressions) click to toggle source

    # File lib/xpath/dsl.rb, line 32
    def anywhere(*expressions)
      Expression.new(:anywhere, expressions)
    end

attr(expression) click to toggle source

    # File lib/xpath/dsl.rb, line 36
    def attr(expression)
      Expression.new(:attribute, current, expression)
    end

axis(name, tag_name=:*) click to toggle source

    # File lib/xpath/dsl.rb, line 20
    def axis(name, tag_name=:*)
      Expression.new(:axis, current, name, tag_name)
    end

child(*expressions) click to toggle source

    # File lib/xpath/dsl.rb, line 16
    def child(*expressions)
      Expression.new(:child, current, expressions)
    end

contains(expression) click to toggle source

    # File lib/xpath/dsl.rb, line 40
    def contains(expression)
      Expression.new(:contains, current, expression)
    end

css(selector) click to toggle source

    # File lib/xpath/dsl.rb, line 56
    def css(selector)
      Expression.new(:css, current, Literal.new(selector))
    end

current() click to toggle source

    # File lib/xpath/dsl.rb, line 4
    def current
      Expression.new(:this_node)
    end

descendant(*expressions) click to toggle source

    # File lib/xpath/dsl.rb, line 12
    def descendant(*expressions)
      Expression.new(:descendant, current, expressions)
    end

name() click to toggle source

    # File lib/xpath/dsl.rb, line 8
    def name
      Expression.new(:node_name, current)
    end

next_sibling(*expressions) click to toggle source

    # File lib/xpath/dsl.rb, line 24
    def next_sibling(*expressions)
      Expression.new(:next_sibling, current, expressions)
    end

previous_sibling(*expressions) click to toggle source

    # File lib/xpath/dsl.rb, line 28
    def previous_sibling(*expressions)
      Expression.new(:previous_sibling, current, expressions)
    end

starts_with(expression) click to toggle source

    # File lib/xpath/dsl.rb, line 44
    def starts_with(expression)
      Expression.new(:starts_with, current, expression)
    end

string() click to toggle source

    # File lib/xpath/dsl.rb, line 52
    def string
      Expression.new(:string_function, current)
    end

text() click to toggle source

    # File lib/xpath/dsl.rb, line 48
    def text
      Expression.new(:text, current)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.