File: expression.rb

package info (click to toggle)
ruby-xpath 2.0.0-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 180 kB
  • sloc: ruby: 993; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 376 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module XPath
  class Expression
    attr_accessor :expression, :arguments
    include XPath::DSL::ExpressionLevel

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

    def current
      self
    end

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