Class: Kiba::Extend::Jobs::MultiSourcePrepJob

Inherits:
Job
  • Object
show all
Defined in:
lib/kiba/extend/jobs/multi_source_prep_job.rb

Overview

Note:

This job should only be run using Kiba::Extend::Destinations::CSV destination

After this job has completed processing, it adds the list of resulting fields to the given helper

See Also:

Since:

  • 2.7.0

Defined Under Namespace

Classes: WrongDestinationTypeError, WrongHelperTypeError

Instance Attribute Summary

Attributes inherited from BaseJob

#context, #control, #files, #outrows, #srcrows, #transformer

Instance Method Summary collapse

Methods inherited from BaseJob

#run

Methods included from Parser

#parse_job

Methods included from Runner

#add_config, #add_decoration, #add_destinations, #add_lookup, #add_sources, #assemble_control, #check_requirements, #destinations, #file_config, #handle_requirements, #lookups_to_memoized_methods, #parse_job_segments, #show_me_decoration, #sources, #tell_me_decoration, #transform

Methods included from Reporter

#desc_and_tags, #get_duration, #minimal_end, #minimal_start, #normal_end, #normal_start, #put_file_details, #report_run_end, #report_run_start, #row_report, #start_and_def, #start_label, #tags, #verbose_end, #verbose_start

Constructor Details

#initialize(files:, transformer:, helper:) ⇒ MultiSourcePrepJob

Returns a new instance of MultiSourcePrepJob.

Parameters:

Raises:

Since:

  • 2.7.0



38
39
40
41
42
43
44
45
46
# File 'lib/kiba/extend/jobs/multi_source_prep_job.rb', line 38

def initialize(files:, transformer:, helper:)
  raise WrongDestinationTypeError unless valid_destination?(files)
  raise WrongHelperTypeError unless helper.is_a?(
    Kiba::Extend::Utils::MultiSourceNormalizer
  )

  @helperobj = helper
  super(files: files, transformer: transformer)
end