Class: Contentful::ObjectCoercion
- Inherits:
-
BaseCoercion
- Object
- BaseCoercion
- Contentful::ObjectCoercion
- Defined in:
- lib/contentful/coercions.rb
Overview
Coercion for Object Types
Instance Attribute Summary
Attributes inherited from BaseCoercion
Instance Method Summary collapse
-
#coerce ⇒ Object
Coerces value to hash, symbolizing each key.
Methods inherited from BaseCoercion
Constructor Details
This class inherits a constructor from Contentful::BaseCoercion
Instance Method Details
#coerce ⇒ Object
Coerces value to hash, symbolizing each key
81 82 83 |
# File 'lib/contentful/coercions.rb', line 81 def coerce(*) JSON.parse(JSON.dump(value), symbolize_names: true) end |