Class: ActiveSupport::Messages::Codec
- Includes:
- Metadata
- Defined in:
- activesupport/lib/active_support/messages/codec.rb
Overview
:nodoc:
Direct Known Subclasses
ActiveSupport::MessageEncryptor, ActiveSupport::MessageVerifier
Constant Summary
Constants included from Metadata
Metadata::ENVELOPE_SERIALIZERS
Instance Attribute Summary
Attributes included from Metadata
#use_message_serializer_for_metadata
Instance Method Summary collapse
-
#initialize(serializer:, url_safe:) ⇒ Codec
constructor
A new instance of Codec.
Constructor Details
#initialize(serializer:, url_safe:) ⇒ Codec
Returns a new instance of Codec.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'activesupport/lib/active_support/messages/codec.rb', line 10 def initialize(serializer:, url_safe:) @serializer = case serializer when :marshal Marshal when :hybrid JsonWithMarshalFallback when :json JSON else serializer end @url_safe = url_safe end |