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.

Constant Summary collapse

BLANK =
''

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.



20
21
22
23
24
# File 'lib/burner/job_with_register.rb', line 20

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.



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

def register
  @register
end