Class: ActiveJob::Serializers::ModuleSerializer
- Inherits:
-
ObjectSerializer
- Object
- ObjectSerializer
- ActiveJob::Serializers::ModuleSerializer
- Defined in:
- activejob/lib/active_job/serializers/module_serializer.rb
Overview
:nodoc:
Instance Method Summary collapse
Methods inherited from ObjectSerializer
Methods included from Singleton
Instance Method Details
#deserialize(hash) ⇒ Object
11 12 13 |
# File 'activejob/lib/active_job/serializers/module_serializer.rb', line 11 def deserialize(hash) hash["value"].constantize end |
#serialize(constant) ⇒ Object
6 7 8 9 |
# File 'activejob/lib/active_job/serializers/module_serializer.rb', line 6 def serialize(constant) raise SerializationError, "Serializing an anonymous class is not supported" unless constant.name super("value" => constant.name) end |