Class: Burner::JobWithRegister

Inherits:
Job
  • Object
show all
Defined in:
lib/burner/job_with_register.rb

Overview

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.

Instance Attribute Summary collapse

Attributes inherited from Job

#name

Instance Method Summary collapse

Methods inherited from Job

#perform

Methods included from Util::Arrayable

#array

Constructor Details

#initialize(name: '', register: DEFAULT_REGISTER) ⇒ JobWithRegister

Returns a new instance of JobWithRegister.



18
19
20
21
22
# File 'lib/burner/job_with_register.rb', line 18

def initialize(name: '', register: DEFAULT_REGISTER)
  super(name: name)

  @register = register.to_s
end

Instance Attribute Details

#registerObject (readonly)

Returns the value of attribute register.



16
17
18
# File 'lib/burner/job_with_register.rb', line 16

def register
  @register
end