Sha256: 79a351e35c3fe35f62775a53e704eb3422dd75ff64684e9bf70f33d904bce549
Contents?: true
Size: 812 Bytes
Versions: 8
Compression:
Stored size: 812 Bytes
Contents
# frozen_string_literal: true module GoodJob module ActiveJobExtensions module Labels extend ActiveSupport::Concern module Prepends def initialize(...) super self.good_job_labels = Array(self.class.good_job_labels.dup) end def enqueue(options = {}) self.good_job_labels = Array(options[:good_job_labels]) if options.key?(:good_job_labels) super end def deserialize(job_data) super self.good_job_labels = job_data.delete("good_job_labels")&.dup || [] end end included do prepend Prepends class_attribute :good_job_labels, instance_accessor: false, instance_predicate: false, default: [] attr_accessor :good_job_labels end end end end
Version data entries
8 entries across 8 versions & 1 rubygems