Module: GoodJob::ActiveJobExtensions::Labels::Prepends
- Defined in:
- lib/good_job/active_job_extensions/labels.rb
Instance Method Summary collapse
Instance Method Details
#deserialize(job_data) ⇒ Object
19 20 21 22 |
# File 'lib/good_job/active_job_extensions/labels.rb', line 19 def deserialize(job_data) super self.good_job_labels = job_data.delete("good_job_labels")&.dup || [] end |
#enqueue(options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/good_job/active_job_extensions/labels.rb', line 14 def enqueue( = {}) self.good_job_labels = Array([:good_job_labels]) if .key?(:good_job_labels) super end |
#initialize(*arguments) ⇒ Object
9 10 11 12 |
# File 'lib/good_job/active_job_extensions/labels.rb', line 9 def initialize(*arguments) super self.good_job_labels = Array(self.class.good_job_labels.dup) end |