Class: Temporal::Saga::Result
- Inherits:
-
Object
- Object
- Temporal::Saga::Result
- Defined in:
- lib/temporal/saga/result.rb
Instance Attribute Summary collapse
-
#rollback_reason ⇒ Object
readonly
Returns the value of attribute rollback_reason.
Instance Method Summary collapse
- #compensated? ⇒ Boolean
- #completed? ⇒ Boolean
-
#initialize(completed, rollback_reason = nil) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(completed, rollback_reason = nil) ⇒ Result
Returns a new instance of Result.
6 7 8 9 10 11 |
# File 'lib/temporal/saga/result.rb', line 6 def initialize(completed, rollback_reason = nil) @completed = completed @rollback_reason = rollback_reason freeze end |
Instance Attribute Details
#rollback_reason ⇒ Object (readonly)
Returns the value of attribute rollback_reason.
4 5 6 |
# File 'lib/temporal/saga/result.rb', line 4 def rollback_reason @rollback_reason end |
Instance Method Details
#compensated? ⇒ Boolean
17 18 19 |
# File 'lib/temporal/saga/result.rb', line 17 def compensated? !completed? end |
#completed? ⇒ Boolean
13 14 15 |
# File 'lib/temporal/saga/result.rb', line 13 def completed? @completed end |