Class: ActiveModel::AttributeRegistration::ClassMethods::PendingAttribute
- Inherits:
 - 
      Object
      
        
- Object
 - ActiveModel::AttributeRegistration::ClassMethods::PendingAttribute
 
 
- Defined in:
 - lib/active_model/attribute_registration.rb
 
Overview
:nodoc:
Instance Attribute Summary collapse
- 
  
    
      #default  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute default.
 - 
  
    
      #type  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute type.
 
Instance Method Summary collapse
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default.
      34 35 36  | 
    
      # File 'lib/active_model/attribute_registration.rb', line 34 def default @default end  | 
  
#type ⇒ Object
Returns the value of attribute type.
      34 35 36  | 
    
      # File 'lib/active_model/attribute_registration.rb', line 34 def type @type end  | 
  
Instance Method Details
#apply_to(attribute) ⇒ Object
      36 37 38 39 40  | 
    
      # File 'lib/active_model/attribute_registration.rb', line 36 def apply_to(attribute) attribute = attribute.with_type(type || attribute.type) attribute = attribute.with_user_default(default) if defined?(@default) attribute end  |