123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::Binary

Do not use. This class is for internal use only.

Class Method Summary

Instance Attribute Summary

Node - Inherited

Instance Method Summary

Constructor Details

.new(left, right) ⇒ Binary

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/binary.rb', line 8

def initialize(left, right)
  super()
  @left  = left
  @right = right
end

Instance Attribute Details

#left (rw) Also known as: #relation

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/binary.rb', line 6

attr_accessor :left, :right

#right (rw) Also known as: #name

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/binary.rb', line 6

attr_accessor :left, :right

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/binary.rb', line 29

alias :== :eql?

#eql?(other) ⇒ Boolean Also known as: #==

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/binary.rb', line 24

def eql?(other)
  self.class == other.class &&
    self.left == other.left &&
    self.right == other.right
end

#hash

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/binary.rb', line 20

def hash
  [self.class, @left, @right].hash
end

#initialize_copy(other)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/binary.rb', line 14

def initialize_copy(other)
  super
  @left  = @left.clone if @left
  @right = @right.clone if @right
end