Class: ActiveSupport::Messages::Codec

Inherits:
Object
  • Object
show all
Includes:
Metadata
Defined in:
lib/active_support/messages/codec.rb

Overview

:nodoc:

Constant Summary

Constants included from Metadata

Metadata::ENVELOPE_SERIALIZERS, Metadata::TIMESTAMP_SERIALIZERS

Instance Attribute Summary

Attributes included from Metadata

#use_message_serializer_for_metadata

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ Codec

Returns a new instance of Codec.



15
16
17
18
19
20
# File 'lib/active_support/messages/codec.rb', line 15

def initialize(**options)
  @serializer = options[:serializer] || self.class.default_serializer
  @serializer = SerializerWithFallback[@serializer] if @serializer.is_a?(Symbol)
  @url_safe = options[:url_safe]
  @force_legacy_metadata_serializer = options[:force_legacy_metadata_serializer]
end