Sha256: c291cec0651310a5ed1742d7df6f40c13331b5bcf2580432671873f7f800e7dc
Contents?: true
Size: 653 Bytes
Versions: 19
Compression:
Stored size: 653 Bytes
Contents
# frozen_string_literal: true require "active_job/serializers/object_serializer" module AcidicJob module Serializers class RecoveryPointSerializer < ::ActiveJob::Serializers::ObjectSerializer def serialize(recovery_point) super( "class" => recovery_point.class.name, "name" => recovery_point.name ) end def deserialize(hash) recovery_point_class = hash["class"].constantize recovery_point_class.new(hash["name"]) end def serialize?(argument) defined?(::AcidicJob::RecoveryPoint) && argument.is_a?(::AcidicJob::RecoveryPoint) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems