Class: Burner::Library::Param::FromRegister

Inherits:
Base show all
Defined in:
lib/burner/library/param/from_register.rb

Overview

Copy a register’s value into a param key. Generally speaking you should only be mutating registers, that way the params stay true to the passed in params for the pipeline. But this job is available in case a param needs to be updated.

Expected Payload input: anything. Payload.params(param_key) output: whatever value was specified in the register.

Constant Summary

Constants inherited from JobWithRegister

JobWithRegister::BLANK

Instance Attribute Summary

Attributes inherited from Base

#param_key

Attributes inherited from JobWithRegister

#register

Attributes inherited from Job

#name

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods inherited from JobWithRegister

#initialize

Methods inherited from Job

#initialize

Methods included from Util::Arrayable

#array

Constructor Details

This class inherits a constructor from Burner::Library::Param::Base

Instance Method Details

#perform(output, payload) ⇒ Object



22
23
24
25
26
# File 'lib/burner/library/param/from_register.rb', line 22

def perform(output, payload)
  output.detail("Pushing value from register: #{register} to param: #{param_key}")

  payload.update_param(param_key, payload[register])
end