Class: Synapse::Serialization::AttributeSerializer

Inherits:
Serializer
  • Object
show all
Defined in:
lib/synapse/serialization/serializer/attribute.rb

Overview

Implementation of a serializer that uses the hashing features of ActiveModel and Virtus

If the object being serialized or deserialized is a hash, it will be untouched

Objects being serialized by this implementation must meet the following requirements:

  • Respond to #attributes and #attributes=

  • #attributes= must work without the deserializer calling #initialize

If either one of these are not met, the serializer may fail instantly or the deserialized object could be put in a bad state

Instance Attribute Summary

Attributes inherited from Serializer

#converter_factory, #revision_resolver

Method Summary

Methods inherited from Serializer

#can_serialize_to?, #class_for, #deserialize, #initialize, #serialize, #type_for

Constructor Details

This class inherits a constructor from Synapse::Serialization::Serializer