Class: Novel::Context
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Novel::Context
- Defined in:
- lib/novel/context.rb
Defined Under Namespace
Modules: Types
Constant Summary collapse
- INIT_SAGA_STATUS =
'started'.freeze
Instance Method Summary collapse
- #compensation_step(step) ⇒ Object
- #completed_compensation_steps ⇒ Object
- #completed_steps ⇒ Object
- #failed? ⇒ Boolean
- #step(step) ⇒ Object
- #success? ⇒ Boolean
Instance Method Details
#compensation_step(step) ⇒ Object
42 43 44 |
# File 'lib/novel/context.rb', line 42 def compensation_step(step) attributes[:compensation_step_results][step] end |
#completed_compensation_steps ⇒ Object
46 47 48 |
# File 'lib/novel/context.rb', line 46 def completed_compensation_steps attributes[:compensation_step_results].keys end |
#completed_steps ⇒ Object
38 39 40 |
# File 'lib/novel/context.rb', line 38 def completed_steps attributes[:step_results].keys end |
#failed? ⇒ Boolean
30 31 32 |
# File 'lib/novel/context.rb', line 30 def failed? attributes[:failed] end |
#step(step) ⇒ Object
34 35 36 |
# File 'lib/novel/context.rb', line 34 def step(step) attributes[:step_results][step] end |
#success? ⇒ Boolean
26 27 28 |
# File 'lib/novel/context.rb', line 26 def success? !attributes[:failed] end |