Class: Flows::SharedContextPipeline::RouterDefinition Private
- Inherits:
-
Object
- Object
- Flows::SharedContextPipeline::RouterDefinition
- Defined in:
- lib/flows/shared_context_pipeline/router_definition.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(routes = {}) ⇒ RouterDefinition
constructor
private
A new instance of RouterDefinition.
-
#to_router(next_step) ⇒ Object
private
:reek:ControlParameter is false positive here.
Constructor Details
#initialize(routes = {}) ⇒ RouterDefinition
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.
Returns a new instance of RouterDefinition.
5 6 7 |
# File 'lib/flows/shared_context_pipeline/router_definition.rb', line 5 def initialize(routes = {}) @routes = routes end |
Instance Method Details
#to_router(next_step) ⇒ Object
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.
:reek:ControlParameter is false positive here
10 11 12 13 14 15 16 17 18 |
# File 'lib/flows/shared_context_pipeline/router_definition.rb', line 10 def to_router(next_step) final_routes = @routes.transform_values do |route| next route unless route == :next next_step || :end end ::Flows::Flow::Router::Custom.new(final_routes) end |