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
- #call_with_circuit_interface(ctx, flow_options, **circuit_options) ⇒ Object
- #options_for_public_call(options, flow_options) ⇒ Object
Instance Method Details
#[](field) ⇒ Object
6 7 8 |
# File 'lib/trailblazer/operation/class_dependencies.rb', line 6 def [](field) @state.to_h[:fields][field] end |
#[]=(field, value) ⇒ Object
10 11 12 13 |
# File 'lib/trailblazer/operation/class_dependencies.rb', line 10 def []=(field, value) = @state.to_h[:fields].merge(field => value) @state.() end |
#call_with_circuit_interface(ctx, flow_options, **circuit_options) ⇒ Object
28 29 30 31 32 |
# File 'lib/trailblazer/operation/class_dependencies.rb', line 28 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
15 16 17 18 |
# File 'lib/trailblazer/operation/class_dependencies.rb', line 15 def (, ) ctx = super context_for_fields(class_fields, [ctx, ]) end |