Module: Trailblazer::Activity::BuildState
- Defined in:
- lib/trailblazer/activity/dsl/strategy/build_state.rb
Class Method Summary collapse
-
.build_normalizer(normalizer_class:, normalizer: false, **options) ⇒ Object
private
Builds the normalizer (to process options in DSL calls) unless :normalizer is already set.
- .build_state(normalizer, builder_class:, builder_options: {}, **options) ⇒ Object private
-
.build_state_for(default_options, options) ⇒ Builder, ...
private
Compute all objects that need to be passed into the new Activity module.
Class Method Details
.build_normalizer(normalizer_class:, normalizer: false, **options) ⇒ 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.
Builds the normalizer (to process options in DSL calls) unless :normalizer is already set.
19 20 21 22 23 |
# File 'lib/trailblazer/activity/dsl/strategy/build_state.rb', line 19 def self.build_normalizer(normalizer_class:, normalizer: false, **) normalizer, = normalizer_class.build( ) unless normalizer return normalizer, end |
.build_state(normalizer, builder_class:, builder_options: {}, **options) ⇒ 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.
26 27 28 29 30 |
# File 'lib/trailblazer/activity/dsl/strategy/build_state.rb', line 26 def self.build_state(normalizer, builder_class:, builder_options: {}, **) builder, adds, circuit, outputs = Magnetic::Builder::State.build(builder_class, normalizer, .merge()) return builder, adds, circuit, outputs, end |
.build_state_for(default_options, options) ⇒ Builder, ...
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.
Compute all objects that need to be passed into the new Activity module.
-
Build the normalizer (unless passed with :normalizer)
-
Build the builder (in State)
-
Let State compute all state variables (that implies recompiling the Process)
10 11 12 13 14 |
# File 'lib/trailblazer/activity/dsl/strategy/build_state.rb', line 10 def self.build_state_for(, ) = .merge() # TODO: use Variables::Merge() here. normalizer, = build_normalizer() builder, adds, circuit, outputs, = build_state(normalizer, ) end |