123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::InfixOperation

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

Class Method Summary

Instance Attribute Summary

Binary - Inherited

Node - Inherited

Instance Method Summary

Binary - Inherited

::Arel::Math - Included

#&, #*, #+, #-, #/, #<<, #>>, #^, #|, #~@

::Arel::OrderPredications - Included

::Arel::AliasPredication - Included

#as

::Arel::Predications - Included

::Arel::Expressions - Included

Node - Inherited

#and

Factory method to create an And node.

#fetch_attribute, #invert,
#not

Factory method to create a Nodes::Not node that has the recipient of the caller as a child.

#or

Factory method to create a Grouping node that has an Or node as a child.

#to_sql

FIXME: this method should go away.

::Arel::FactoryMethods - Included

Constructor Details

.new(operator, left, right) ⇒ InfixOperation

[ GitHub ]

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

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

Instance Attribute Details

#operator (readonly)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/infix_operation.rb', line 12

attr_reader :operator

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/infix_operation.rb', line 26

alias :== :eql?

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

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/infix_operation.rb', line 23

def eql?(other)
  super && self.operator == other.operator
end

#hash

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/infix_operation.rb', line 19

def hash
  [super, @operator].hash
end