Sha256: 301d249adc567d932a992be5d2538bd085b713058d5cecd906b723a75686b579
Contents?: true
Size: 488 Bytes
Versions: 9
Compression:
Stored size: 488 Bytes
Contents
# frozen_string_literal: true require "json" module AcidicJob class Serializer # Used for `serialize` method in ActiveRecord class << self def load(json) return if json.nil? || json.empty? data = JSON.parse(json) Arguments.deserialize(data).first end def dump(obj) data = Arguments.serialize [obj] data.to_json rescue ActiveJob::SerializationError raise UnserializableValue end end end end
Version data entries
9 entries across 9 versions & 1 rubygems