123456789_123456789_123456789_123456789_123456789_

Class: ActiveModel::AttributeRegistration::ClassMethods::PendingType

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:
self, ::Struct
Inherits: Struct
  • ::Object
Defined in: activemodel/lib/active_model/attribute_registration.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#name (rw, private)

[ GitHub ]

  
# File 'activemodel/lib/active_model/attribute_registration.rb', line 54

PendingType = Struct.new(:name, :type)

#type (rw, private)

[ GitHub ]

  
# File 'activemodel/lib/active_model/attribute_registration.rb', line 54

PendingType = Struct.new(:name, :type)

Instance Method Details

#apply_to(attribute_set)

[ GitHub ]

  
# File 'activemodel/lib/active_model/attribute_registration.rb', line 55

def apply_to(attribute_set)
  attribute = attribute_set[name]
  attribute_set[name] = attribute.with_type(type || attribute.type)
end