Module: Flows::SharedContextPipeline::DSL::Tracks Private
- Includes:
- Util::InheritableSingletonVars::DupStrategy.make_module( '@tracks' => TrackList.new )
- Included in:
- Flows::SharedContextPipeline::DSL
- Defined in:
- lib/flows/shared_context_pipeline/dsl/tracks.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- DEFAULT_ROUTER_DEF =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
RouterDefinition.new( Flows::Result::Ok => :next, Flows::Result::Err => :end )
- SingletonVarsSetup =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Flows::Util::InheritableSingletonVars::DupStrategy.make_module( '@tracks' => TrackList.new )
Instance Attribute Summary collapse
- #tracks ⇒ Object readonly private
Instance Method Summary collapse
- #mut_step(name, router_def = DEFAULT_ROUTER_DEF, body: nil) ⇒ Object private
-
#routes(routes_def) ⇒ Object
private
:reek:UtilityFunction is allowed here.
- #step(name, router_def = DEFAULT_ROUTER_DEF, body: nil) ⇒ Object private
- #track(name, &block) ⇒ Object private
- #wrap(name, router_def = DEFAULT_ROUTER_DEF, &tracks_definitions) ⇒ Object private
Instance Attribute Details
#tracks ⇒ Object (readonly)
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.
17 18 19 |
# File 'lib/flows/shared_context_pipeline/dsl/tracks.rb', line 17 def tracks @tracks end |
Instance Method Details
#mut_step(name, router_def = DEFAULT_ROUTER_DEF, body: nil) ⇒ 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.
25 26 27 28 29 |
# File 'lib/flows/shared_context_pipeline/dsl/tracks.rb', line 25 def mut_step(name, router_def = DEFAULT_ROUTER_DEF, body: nil) tracks.add_step( MutationStep.new(name: name, body: body, router_def: router_def) ) end |
#routes(routes_def) ⇒ 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:UtilityFunction is allowed here
46 47 48 |
# File 'lib/flows/shared_context_pipeline/dsl/tracks.rb', line 46 def routes(routes_def) RouterDefinition.new(routes_def) end |
#step(name, router_def = DEFAULT_ROUTER_DEF, body: nil) ⇒ 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.
19 20 21 22 23 |
# File 'lib/flows/shared_context_pipeline/dsl/tracks.rb', line 19 def step(name, router_def = DEFAULT_ROUTER_DEF, body: nil) tracks.add_step( Step.new(name: name, body: body, router_def: router_def) ) end |
#track(name, &block) ⇒ 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.
37 38 39 40 41 42 43 |
# File 'lib/flows/shared_context_pipeline/dsl/tracks.rb', line 37 def track(name, &block) track_before = tracks.current_track tracks.switch_track(name) instance_exec(&block) tracks.switch_track(track_before) end |
#wrap(name, router_def = DEFAULT_ROUTER_DEF, &tracks_definitions) ⇒ 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.
31 32 33 34 35 |
# File 'lib/flows/shared_context_pipeline/dsl/tracks.rb', line 31 def wrap(name, router_def = DEFAULT_ROUTER_DEF, &tracks_definitions) tracks.add_step( Wrap.new(method_name: name, router_def: router_def, &tracks_definitions) ) end |