1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/lib/arel/nodes/extract.rb

25 lines
430 B
Ruby

module Arel
module Nodes
class Extract < Arel::Nodes::Unary
include Arel::AliasPredication
include Arel::Predications
attr_accessor :field
def initialize expr, field
super(expr)
@field = field
end
def hash
super ^ @field.hash
end
def eql? other
super &&
self.field == other.field
end
alias :== :eql?
end
end
end