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.
182 183 184 |
# File 'lib/teckel/chain.rb', line 182 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.
196 197 198 |
# File 'lib/teckel/chain.rb', line 196 def result @result end |
#step ⇒ Teckel::Operation
Returns the failed Operation.
188 189 190 |
# File 'lib/teckel/chain.rb', line 188 def step @step end |
#step_name ⇒ String
Returns the step name of the failed Operation.
192 193 194 |
# File 'lib/teckel/chain.rb', line 192 def step_name @step_name end |
Instance Method Details
#failure ⇒ Object
Delegates to result.failure
213 |
# File 'lib/teckel/chain.rb', line 213 def_delegators :@result, :value, :successful?, :success, :failure?, :failure |
#failure? ⇒ Object
Delegates to result.failure?
213 |
# File 'lib/teckel/chain.rb', line 213 def_delegators :@result, :value, :successful?, :success, :failure?, :failure |
#success ⇒ Object
Delegates to result.success
213 |
# File 'lib/teckel/chain.rb', line 213 def_delegators :@result, :value, :successful?, :success, :failure?, :failure |
#successful? ⇒ Object
Delegates to result.successful?
213 |
# File 'lib/teckel/chain.rb', line 213 def_delegators :@result, :value, :successful?, :success, :failure?, :failure |
#value ⇒ Object
Delegates to result.value
213 |
# File 'lib/teckel/chain.rb', line 213 def_delegators :@result, :value, :successful?, :success, :failure?, :failure |