Class: CacheKeeper::NewInstanceSerializer
- Inherits:
-
ActiveJob::Serializers::ObjectSerializer
- Object
- ActiveJob::Serializers::ObjectSerializer
- CacheKeeper::NewInstanceSerializer
- Defined in:
- app/serializers/cache_keeper/new_instance_serializer.rb
Instance Method Summary collapse
Instance Method Details
#deserialize(json) ⇒ Object
6 7 8 |
# File 'app/serializers/cache_keeper/new_instance_serializer.rb', line 6 def deserialize(json) json["klass"].constantize.new end |
#serialize(target) ⇒ Object
2 3 4 |
# File 'app/serializers/cache_keeper/new_instance_serializer.rb', line 2 def serialize(target) super("klass" => target.class.to_s) end |