Module: Kiba::Extend::Mixins::IterativeCleanup::Jobs
- Defined in:
- lib/kiba/extend/mixins/iterative_cleanup/jobs.rb,
lib/kiba/extend/mixins/iterative_cleanup/jobs/final.rb,
lib/kiba/extend/mixins/iterative_cleanup/jobs/worksheet.rb,
lib/kiba/extend/mixins/iterative_cleanup/jobs/corrections.rb,
lib/kiba/extend/mixins/iterative_cleanup/jobs/cleaned_uniq.rb,
lib/kiba/extend/mixins/iterative_cleanup/jobs/base_job_cleaned.rb,
lib/kiba/extend/mixins/iterative_cleanup/jobs/returned_compiled.rb
Overview
Namespace for jobs set up via extending the Kiba::Extend::Mixins::IterativeCleanup module
Each job is passed mod
when it is called. This is the
cleanup config module that extends
Kiba::Extend::Mixins::IterativeCleanup. The job refers to
configuration settings from the config module to
dynamically define the job at runtime.
Each job defined in this namespace has a set of standard
transforms, which can be viewed in the source of its
xforms
method
The extending config module may define custom transforms to be run pre and/or post the standard transforms for each job. The pattern for doing this is:
- Take the name of the relevant job module, e.g.
- BaseJobCleaned
- Convert it to lowercase snake case, e.g. base_job_cleaned
- Indicate pre or post standard transforms: e.g. base_job_cleaned_pre_xforms or base_job_cleaned_post_xforms. This is the name of the method you define in the extending configuration module.
- The method definition should be just as the
xforms
methods in all jobs. It should be a set of transforms defined within aKiba.job_segment
block. If the custom xforms method needs to call methods/settings defined in the config module, usebinding
as shown below:
def base_job_cleaned_post_xforms
bind = binding
Kiba.job_segment do
mod = bind.receiver
transform Delete::Fields,
fields: mod.post_xform_delete_fields
end
end
Defined Under Namespace
Modules: BaseJobCleaned, CleanedUniq, Corrections, Final, ReturnedCompiled, Worksheet