Module: Kiba::Extend::Mixins::IterativeCleanup::Jobs::Final

Defined in:
lib/kiba/extend/mixins/iterative_cleanup/jobs/final.rb

Overview

Since:

  • 4.0.0

Class Method Summary collapse

Class Method Details

.get_xforms(mod) ⇒ Object

Since:

  • 4.0.0



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/kiba/extend/mixins/iterative_cleanup/jobs/final.rb', line 21

def get_xforms(mod)
  base = []
  if mod.respond_to?(:final_pre_xforms)
    base << mod.final_pre_xforms
  end
  base << xforms(mod)
  if mod.respond_to?(:final_post_xforms)
    base << mod.final_post_xforms
  end
  base
end

.job(mod:) ⇒ Object

Since:

  • 4.0.0



11
12
13
14
15
16
17
18
19
# File 'lib/kiba/extend/mixins/iterative_cleanup/jobs/final.rb', line 11

def job(mod:)
  Kiba::Extend::Jobs::Job.new(
    files: {
      source: mod.base_job_cleaned_job_key,
      destination: mod.final_job_key
    },
    transformer: get_xforms(mod)
  )
end

.xforms(mod) ⇒ Object

Since:

  • 4.0.0



33
34
35
36
37
# File 'lib/kiba/extend/mixins/iterative_cleanup/jobs/final.rb', line 33

def xforms(mod)
  Kiba.job_segment do
    # passthrough - pre and post mean nothing here
  end
end