class Arel::Nodes::Casted

:nodoc:

def eql?(other)

def eql?(other)
  self.class == other.class &&
    self.value == other.value &&
    self.attribute == other.attribute
end

def hash

def hash
  [self.class, value, attribute].hash
end

def initialize(value, attribute)

def initialize(value, attribute)
  @value     = value
  @attribute = attribute
  super()
end

def nil?; value.nil?; end

def nil?; value.nil?; end

def value_for_database

def value_for_database
  if attribute.able_to_type_cast?
    attribute.type_cast_for_database(value)
  else
    value
  end
end