Class: Contentful::ArrayCoercion
- Inherits:
-
BaseCoercion
- Object
- BaseCoercion
- Contentful::ArrayCoercion
- Defined in:
- lib/contentful/coercions.rb
Overview
Coercion for Array Types
Instance Attribute Summary
Attributes inherited from BaseCoercion
Instance Method Summary collapse
-
#coerce ⇒ Object
Coerces value for each element.
Methods inherited from BaseCoercion
Constructor Details
This class inherits a constructor from Contentful::BaseCoercion
Instance Method Details
#coerce ⇒ Object
Coerces value for each element
95 96 97 98 99 |
# File 'lib/contentful/coercions.rb', line 95 def coerce(*) value.map do |e| [:coercion_class].new(e).coerce end end |