Module: ActiveModel::Coercions::ClassMethods
- Defined in:
- lib/active_model/coercions.rb
Instance Attribute Summary collapse
-
#declared_coercions ⇒ Object
Returns the value of attribute declared_coercions.
Instance Method Summary collapse
Instance Attribute Details
#declared_coercions ⇒ Object
Returns the value of attribute declared_coercions.
18 19 20 |
# File 'lib/active_model/coercions.rb', line 18 def declared_coercions @declared_coercions end |
Instance Method Details
#attribute(attr, type) ⇒ Object
20 21 22 |
# File 'lib/active_model/coercions.rb', line 20 def attribute(attr, type) @declared_coercions[attr] = Coercer.new(type) end |