123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::UnaryOperation

Do not use. This class is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Arel::Nodes::Unary
Defined in: activerecord/lib/arel/nodes/unary_operation.rb

Class Method Summary

Instance Attribute Summary

Unary - Inherited

#expr,
#value

Alias for Unary#expr.

Node - Inherited

Instance Method Summary

Unary - Inherited

#==

Alias for Unary#eql?.

#eql?, #hash

::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, operand) ⇒ UnaryOperation

[ GitHub ]

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

def initialize(operator, operand)
  super(operand)
  @operator = operator
end

Instance Attribute Details

#operator (readonly)

[ GitHub ]

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

attr_reader :operator

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

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

alias :== :eql?

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

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/unary_operation.rb', line 17

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

#hash

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/unary_operation.rb', line 13

def hash
  [super, @operator].hash
end