Class: Contentful::ArrayCoercion

Inherits:
BaseCoercion show all
Defined in:
lib/contentful/coercions.rb

Overview

Coercion for Array Types

Instance Attribute Summary

Attributes inherited from BaseCoercion

#options, #value

Instance Method Summary collapse

Methods inherited from BaseCoercion

#initialize

Constructor Details

This class inherits a constructor from Contentful::BaseCoercion

Instance Method Details

#coerceObject

Coerces value for each element



110
111
112
113
114
# File 'lib/contentful/coercions.rb', line 110

def coerce
  value.map do |e|
    options[:coercion_class].new(e).coerce
  end
end