Module: Trailblazer::Context

Defined in:
lib/trailblazer/context.rb,
lib/trailblazer/context/version.rb,
lib/trailblazer/context/container.rb,
lib/trailblazer/context/container/with_aliases.rb,
lib/trailblazer/context/store/indifferent_access.rb

Overview

Holds local options (aka `mutable_options`) and “original” options from the “outer” activity (aka wrapped_options). only public creator: Build :data object:

Defined Under Namespace

Modules: Store Classes: Container, ContainerChain

Constant Summary collapse

VERSION =
"0.5.0"

Class Method Summary collapse

Class Method Details

.build(wrapped_options, mutable_options, container_class:, **context_options) ⇒ Object


24
25
26
# File 'lib/trailblazer/context.rb', line 24

def build(wrapped_options, mutable_options, container_class:, **context_options)
  container_class.new(wrapped_options, mutable_options, **context_options)
end

.for_circuit(wrapped_options, mutable_options, _, flow_options) ⇒ Object


20
21
22
# File 'lib/trailblazer/context.rb', line 20

def for_circuit(wrapped_options, mutable_options, (_, flow_options), **)
  build(wrapped_options, mutable_options, **flow_options.fetch(:context_options))
end