class Burner::JobWithRegister

Add on a register attribute to the configuration for a job. This indicates that a job either accesses and/or mutates the payload's registers.

Constants

BLANK

Attributes

register[R]

Public Class Methods

new(name: '', register: DEFAULT_REGISTER) click to toggle source
Calls superclass method Burner::Job::new
# File lib/burner/job_with_register.rb, line 20
def initialize(name: '', register: DEFAULT_REGISTER)
  super(name: name)

  @register = register.to_s
end

Protected Instance Methods

ensure_array(payload) click to toggle source

Helper method that knows how to ensure the register is an array.

# File lib/burner/job_with_register.rb, line 29
def ensure_array(payload)
  payload[register] = array(payload[register])
end