Class: ActiveModel::AttributeRegistration::ClassMethods::PendingDecorator
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 |
| Defined in: | activemodel/lib/active_model/attribute_registration.rb |
Instance Attribute Summary
- #decorator rw private
- #names rw private
Instance Method Summary
Instance Attribute Details
#decorator (rw, private)
[ GitHub ]#names (rw, private)
[ GitHub ]Instance Method Details
#apply_to(attributes)
[ GitHub ]# File 'activemodel/lib/active_model/attribute_registration.rb', line 99
def apply_to(attributes) (names || attributes.keys.select { |name| attributes[name].initialized? }).each do |name| attribute = attributes[name] || Attribute.null(name) type = decorator.call(name, attribute.type) attributes[name] = attribute.with_type(type) if type end end