Class: AcidicJob::Serializers::WorkerSerializer
- Inherits:
-
ActiveJob::Serializers::ObjectSerializer
- Object
- ActiveJob::Serializers::ObjectSerializer
- AcidicJob::Serializers::WorkerSerializer
- Defined in:
- lib/acidic_job/serializers/worker_serializer.rb
Instance Method Summary collapse
Instance Method Details
#deserialize(hash) ⇒ Object
14 15 16 17 |
# File 'lib/acidic_job/serializers/worker_serializer.rb', line 14 def deserialize(hash) worker_class = hash["job_class"].constantize worker_class.new end |
#serialize(worker) ⇒ Object
8 9 10 11 12 |
# File 'lib/acidic_job/serializers/worker_serializer.rb', line 8 def serialize(worker) super( "job_class" => worker.class.name ) end |