Class: RSMP::Termination

Inherits:
Data
  • Object
show all
Defined in:
lib/rsmp/termination.rb

Overview

An explicit reason for a long-running service task to finish normally.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason:, source:) ⇒ Termination

Returns a new instance of Termination.

Raises:



4
5
6
7
8
# File 'lib/rsmp/termination.rb', line 4

def initialize(reason:, source:)
  raise ArgumentError, 'termination reason must be a Symbol' unless reason.is_a?(Symbol)

  super
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason

Returns:

  • the current value of reason



3
4
5
# File 'lib/rsmp/termination.rb', line 3

def reason
  @reason
end

#sourceObject (readonly)

Returns the value of attribute source

Returns:

  • the current value of source



3
4
5
# File 'lib/rsmp/termination.rb', line 3

def source
  @source
end