class Arel::Nodes::And - arel-4.0.2 Documentation

# class Arel::Nodes::And

### Attributes

children[R]

### Public Class Methods

new(children, right = nil) click to toggle source
Calls superclass method Arel::Nodes::Node.new

    # File lib/arel/nodes/and.rb, line 6
    def initialize children, right = nil
      super()
      unless Array === children
        warn "(#{caller.first}) AND nodes should be created with a list"
        children = [children, right]
      end
      @children = children
    end

### Public Instance Methods

==(other)
Alias for: eql?
eql?(other) click to toggle source

    # File lib/arel/nodes/and.rb, line 27
    def eql? other
      self.class == other.class &&
        self.children == other.children
    end

Also aliased as: ==
hash() click to toggle source

    # File lib/arel/nodes/and.rb, line 23
    def hash
      children.hash
    end

left() click to toggle source

    # File lib/arel/nodes/and.rb, line 15
    def left
      children.first
    end

right() click to toggle source

    # File lib/arel/nodes/and.rb, line 19
    def right
      children[1]
    end