Sha256: f8ec33502b3f436e157664842caa31f520cfa6397bd5aca698d082096b64d778
Contents?: true
Size: 771 Bytes
Versions: 6
Compression:
Stored size: 771 Bytes
Contents
# frozen_string_literal: true # # Copyright (c) 2020-present, Blue Marble Payroll, LLC # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # require_relative 'job' module Burner # 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. class JobWithRegister < Job attr_reader :register def initialize(name: '', register: DEFAULT_REGISTER) super(name: name) @register = register.to_s end protected # Helper method that knows how to ensure the register is an array. def ensure_array(payload) payload[register] = array(payload[register]) end end end
Version data entries
6 entries across 6 versions & 1 rubygems