Class: RSMP::Termination
- Inherits:
-
Data
- Object
- Data
- RSMP::Termination
- Defined in:
- lib/rsmp/termination.rb
Overview
An explicit reason for a long-running service task to finish normally.
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(reason:, source:) ⇒ Termination
constructor
A new instance of Termination.
Constructor Details
#initialize(reason:, source:) ⇒ Termination
Returns a new instance of Termination.
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
#reason ⇒ Object (readonly)
Returns the value of attribute reason
3 4 5 |
# File 'lib/rsmp/termination.rb', line 3 def reason @reason end |
#source ⇒ Object (readonly)
Returns the value of attribute source
3 4 5 |
# File 'lib/rsmp/termination.rb', line 3 def source @source end |