123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::Extract

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

Class Method Summary

Unary - Inherited

Instance Attribute Summary

Unary - Inherited

#expr,
#value

Alias for Unary#expr.

Node - Inherited

Instance Method Summary

Constructor Details

.new(expr, field) ⇒ Extract

[ GitHub ]

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

def initialize(expr, field)
  super(expr)
  @field = field
end

Instance Attribute Details

#field (rw)

[ GitHub ]

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

attr_accessor :field

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/extract.rb', line 21

alias :== :eql?

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

[ GitHub ]

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

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

#hash

[ GitHub ]

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

def hash
  super ^ @field.hash
end