Module: Substation::Processor
- Defined in:
- lib/substation/processor.rb,
lib/substation/processor/nest.rb,
lib/substation/processor/config.rb,
lib/substation/processor/builder.rb,
lib/substation/processor/wrapper.rb,
lib/substation/processor/executor.rb,
lib/substation/processor/evaluator.rb,
lib/substation/processor/transformer.rb,
lib/substation/processor/evaluator/result.rb,
lib/substation/processor/evaluator/handler.rb
Overview
Namespace for chain processors
Defined Under Namespace
Modules: Fallible, Incoming, Nest, Outgoing, Pivot, Transformer, Wrapper Classes: Builder, Config, Evaluator, Executor
Instance Method Summary collapse
-
#initialize(_name, _handler, _config) ⇒ undefined
private
Initialize a new instance.
-
#result(response) ⇒ Response
private
The response passed on to the next processor in a Chain.
-
#success?(response) ⇒ true, false
private
Test wether chain processing should continue.
Instance Method Details
#initialize(_name, _handler, _config) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize a new instance
27 28 29 30 31 32 |
# File 'lib/substation/processor.rb', line 27 def initialize(_name, _handler, _config) super @executor = config.executor @observers = config.observers @failure_chain = config.failure_chain end |
#result(response) ⇒ Response
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The response passed on to the next processor in a Chain
87 88 89 |
# File 'lib/substation/processor.rb', line 87 def result(response) response end |
#success?(response) ⇒ true, false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test wether chain processing should continue
74 75 76 |
# File 'lib/substation/processor.rb', line 74 def success?(response) response.success? end |