123456789_123456789_123456789_123456789_123456789_

Class: Arel::Attributes::Attribute

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ::Struct
Instance Chain:
Inherits: Struct
Defined in: activerecord/lib/arel/attributes/attribute.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#able_to_type_cast?Boolean (readonly)

[ GitHub ]

  
# File 'activerecord/lib/arel/attributes/attribute.rb', line 26

def able_to_type_cast?
  relation.able_to_type_cast?
end

#name (rw)

[ GitHub ]

  
# File 'activerecord/lib/arel/attributes/attribute.rb', line 5

class Attribute < Struct.new :relation, :name
      include Arel::Expressions
      include Arel::Predications
      include Arel::AliasPredication
      include Arel::OrderPredications
      include Arel::Math

      def type_caster
relation.type_for_attribute(name)

#relation (rw)

[ GitHub ]

  
# File 'activerecord/lib/arel/attributes/attribute.rb', line 5

class Attribute < Struct.new :relation, :name
      include Arel::Expressions
      include Arel::Predications
      include Arel::AliasPredication
      include Arel::OrderPredications
      include Arel::Math

      def type_caster
relation.type_for_attribute(name)

Instance Method Details

#lower

Create a node for lowering this attribute

[ GitHub ]

  
# File 'activerecord/lib/arel/attributes/attribute.rb', line 18

def lower
  relation.lower self
end

#type_cast_for_database(value)

[ GitHub ]

  
# File 'activerecord/lib/arel/attributes/attribute.rb', line 22

def type_cast_for_database(value)
  relation.type_cast_for_database(name, value)
end

#type_caster

[ GitHub ]

  
# File 'activerecord/lib/arel/attributes/attribute.rb', line 12

def type_caster
  relation.type_for_attribute(name)
end