Sha256: 367a1b4a9b05db83e6b4fdf3c006c4b3391a1975eabba517d87f7ee4c18d1530

Contents?: true

Size: 582 Bytes

Versions: 4

Compression:

Stored size: 582 Bytes

Contents

require_relative 'all_jobs_shared'

class ParametersJob < Remi::Job
  param(:myparam) {}
  param(:test_parameter) { "my test parameter value" }

  source :source_data do
    fields(
      {
        :parameter_name => {}
      }
    )
  end

  target :target_data

  transform :main do
    Remi::SourceToTargetMap.apply(source_data.df, target_data.df) do
      map target(:myparam)
        .transform(Remi::Transform::Constant.new(job.params[:myparam]))
      map source(:parameter_name) .target(:parameter_name)
        .transform(->(v) { job.params[v.to_sym] })
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
remi-0.3.3 jobs/parameters_job.rb
remi-0.3.2 jobs/parameters_job.rb
remi-0.3.1 jobs/parameters_job.rb
remi-0.3.0 jobs/parameters_job.rb