Module: Trailblazer::Operation::ClassDependencies
- Defined in:
- lib/trailblazer/operation/class_dependencies.rb
Overview
The use of this module is currently not encouraged and it is only here for backward-compatibility. Instead, please pass dependencies via containers, locals, or macros into the respective steps.
Instance Method Summary collapse
- #[](field) ⇒ Object
-
#[]=(field, value) ⇒ Object
Store a field on @state, which is provided by Strategy.
- #call_with_circuit_interface(ctx, flow_options, **circuit_options) ⇒ Object
- #options_for_public_call(options, flow_options) ⇒ Object
Instance Method Details
#[](field) ⇒ Object
7 8 9 |
# File 'lib/trailblazer/operation/class_dependencies.rb', line 7 def [](field) class_fields[field] end |
#[]=(field, value) ⇒ Object
Store a field on @state, which is provided by Strategy.
12 13 14 15 16 |
# File 'lib/trailblazer/operation/class_dependencies.rb', line 12 def []=(field, value) @state.update!(:fields) do |fields| fields.merge(field => value) end end |
#call_with_circuit_interface(ctx, flow_options, **circuit_options) ⇒ Object
31 32 33 34 35 |
# File 'lib/trailblazer/operation/class_dependencies.rb', line 31 def call_with_circuit_interface((ctx, ), **) ctx_with_fields = context_for_fields(class_fields, [ctx, ], **) super([ctx_with_fields, ], **) # FIXME: should we unwrap here? end |
#options_for_public_call(options, flow_options) ⇒ Object
18 19 20 21 |
# File 'lib/trailblazer/operation/class_dependencies.rb', line 18 def (, ) ctx = super context_for_fields(class_fields, [ctx, ]) end |