Class: Teckel::Chain::StepFailure
- Inherits:
-
Object
- Object
- Teckel::Chain::StepFailure
- Extended by:
- Forwardable
- Defined in:
- lib/teckel/chain.rb
Overview
Like Teckel::Result but for failing Chains
When a Chain fails, it stores the failed Operation and it’s name.
Instance Attribute Summary collapse
-
#result ⇒ Teckel::Result
The failure Result.
-
#step ⇒ Teckel::Operation
The failed Operation.
-
#step_name ⇒ String
The step name of the failed Operation.
Instance Method Summary collapse
-
#failure ⇒ Object
Delegates to
result.failure. -
#failure? ⇒ Object
Delegates to
result.failure?. -
#initialize(step, step_name, result) ⇒ StepFailure
constructor
A new instance of StepFailure.
-
#success ⇒ Object
Delegates to
result.success. -
#successful? ⇒ Object
Delegates to
result.successful?. -
#value ⇒ Object
Delegates to
result.value.
Constructor Details
#initialize(step, step_name, result) ⇒ StepFailure
Returns a new instance of StepFailure.
102 103 104 |
# File 'lib/teckel/chain.rb', line 102 def initialize(step, step_name, result) @step, @step_name, @result = step, step_name, result end |
Instance Attribute Details
#result ⇒ Teckel::Result
Returns the failure Result.
116 117 118 |
# File 'lib/teckel/chain.rb', line 116 def result @result end |
#step ⇒ Teckel::Operation
Returns the failed Operation.
108 109 110 |
# File 'lib/teckel/chain.rb', line 108 def step @step end |
#step_name ⇒ String
Returns the step name of the failed Operation.
112 113 114 |
# File 'lib/teckel/chain.rb', line 112 def step_name @step_name end |
Instance Method Details
#failure ⇒ Object
Delegates to result.failure
133 |
# File 'lib/teckel/chain.rb', line 133 def_delegators :@result, :value, :successful?, :success, :failure?, :failure |
#failure? ⇒ Object
Delegates to result.failure?
133 |
# File 'lib/teckel/chain.rb', line 133 def_delegators :@result, :value, :successful?, :success, :failure?, :failure |
#success ⇒ Object
Delegates to result.success
133 |
# File 'lib/teckel/chain.rb', line 133 def_delegators :@result, :value, :successful?, :success, :failure?, :failure |
#successful? ⇒ Object
Delegates to result.successful?
133 |
# File 'lib/teckel/chain.rb', line 133 def_delegators :@result, :value, :successful?, :success, :failure?, :failure |
#value ⇒ Object
Delegates to result.value
133 |
# File 'lib/teckel/chain.rb', line 133 def_delegators :@result, :value, :successful?, :success, :failure?, :failure |