Sha256: d65834e3552ba73bba96b8f285899998ed2a441d46fa0badabc7e283fbf2a8cc
Contents?: true
Size: 511 Bytes
Versions: 10
Compression:
Stored size: 511 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.send :deserialize_argument, data end def dump(obj) data = Arguments.send :serialize_argument, obj data.to_json rescue ActiveJob::SerializationError raise UnserializableValue end end end end
Version data entries
10 entries across 10 versions & 1 rubygems