Sha256: 9e871a9b76dca0498803c0c9a223f952dc9e21f7c9d82ee2efe8b2102876bcd1

Contents?: true

Size: 511 Bytes

Versions: 28

Compression:

Stored size: 511 Bytes

Contents

module XPath
  class Union
    include Enumerable

    attr_reader :expressions
    alias_method :arguments, :expressions

    def initialize(*expressions)
      @expressions = expressions
    end

    def expression
      :union
    end

    def each(&block)
      arguments.each(&block)
    end

    def method_missing(*args)
      XPath::Union.new(*arguments.map { |e| e.send(*args) })
    end

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

Version data entries

28 entries across 24 versions & 8 rubygems

Version Path
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/xpath-2.1.0/lib/xpath/union.rb
tdiary-5.0.11 vendor/bundle/gems/xpath-3.1.0/lib/xpath/union.rb
tdiary-5.0.9 vendor/bundle/gems/xpath-3.1.0/lib/xpath/union.rb
xpath-3.1.0 lib/xpath/union.rb
tdiary-5.0.8 vendor/bundle/ruby/2.5.0/gems/xpath-3.0.0/lib/xpath/union.rb
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/xpath-2.1.0/lib/xpath/union.rb
tdiary-5.0.8 vendor/bundle/gems/xpath-3.0.0/lib/xpath/union.rb
xpath-3.0.0 lib/xpath/union.rb
tdiary-5.0.7 vendor/bundle/gems/xpath-2.1.0/lib/xpath/union.rb
tdiary-5.0.6 vendor/bundle/gems/xpath-2.1.0/lib/xpath/union.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/xpath-2.0.0/lib/xpath/union.rb
tdiary-5.0.5 vendor/bundle/gems/xpath-2.0.0/lib/xpath/union.rb
tdiary-5.0.5 vendor/bundle/gems/xpath-2.1.0/lib/xpath/union.rb
xpath-2.1.0 lib/xpath/union.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/xpath-2.0.0/lib/xpath/union.rb
tdiary-5.0.4 vendor/bundle/gems/xpath-2.0.0/lib/xpath/union.rb
tdiary-5.0.2 vendor/bundle/gems/xpath-2.0.0/lib/xpath/union.rb
tdiary-5.0.1 vendor/bundle/gems/xpath-2.0.0/lib/xpath/union.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/xpath-2.0.0/lib/xpath/union.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/xpath-2.0.0/lib/xpath/union.rb