Sha256: 40e2e626518300b9cbe2e5c4e79f5fc78520e2c130f6bc77538a991dd4947797
Contents?: true
Size: 598 Bytes
Versions: 19
Compression:
Stored size: 598 Bytes
Contents
# frozen_string_literal: true require "active_job/serializers/object_serializer" module AcidicJob module Serializers class FinishedPointSerializer < ::ActiveJob::Serializers::ObjectSerializer def serialize(finished_point) super( "class" => finished_point.class.name ) end def deserialize(hash) finished_point_class = hash["class"].constantize finished_point_class.new end def serialize?(argument) defined?(::AcidicJob::FinishedPoint) && argument.is_a?(::AcidicJob::FinishedPoint) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems