Class: Trailblazer::Context::Container
- Inherits:
-
Object
- Object
- Trailblazer::Context::Container
- Extended by:
- Delegations
- Includes:
- CommonMethods
- Defined in:
- lib/trailblazer/context/container.rb,
lib/trailblazer/context/container/with_aliases.rb
Direct Known Subclasses
Defined Under Namespace
Modules: CommonMethods, Delegations Classes: UseWithAliases, WithAliases
Instance Method Summary collapse
-
#decompose ⇒ Object
Return the Context’s two components.
-
#initialize(wrapped_options, mutable_options, replica_class:, aliases: nil) ⇒ Container
constructor
A new instance of Container.
- #inspect ⇒ Object (also: #to_s)
Methods included from CommonMethods
#[], #[]=, #delete, #each, #fetch, #key?, #keys, #merge, #to_hash, #value?, #values
Constructor Details
#initialize(wrapped_options, mutable_options, replica_class:, aliases: nil) ⇒ Container
Returns a new instance of Container.
14 15 16 17 18 19 20 21 22 |
# File 'lib/trailblazer/context/container.rb', line 14 def initialize(, , replica_class:, aliases: nil, **) raise UseWithAliases if aliases @wrapped_options = @mutable_options = @replica_class = replica_class @replica = initialize_replica_store end |
Instance Method Details
#decompose ⇒ Object
Return the Context’s two components. Used when computing the new output for the next activity.
26 27 28 |
# File 'lib/trailblazer/context/container.rb', line 26 def decompose [@wrapped_options, @mutable_options] end |
#inspect ⇒ Object Also known as: to_s
30 31 32 |
# File 'lib/trailblazer/context/container.rb', line 30 def inspect %{#<Trailblazer::Context::Container wrapped_options=#{@wrapped_options} mutable_options=#{@mutable_options}>} end |