Module: Trailblazer
- 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
TODO: mark/make all but mutable_options as frozen. The idea of Context is to have a generic, ordered read/write interface that collects mutable runtime-computed data while providing access to compile-time information. The runtime-data takes precedence over the class data.
Defined Under Namespace
Modules: Context
Class Method Summary collapse
Class Method Details
.Context(wrapped_options, mutable_options = {}, context_options = nil) ⇒ Object
29 30 31 32 |
# File 'lib/trailblazer/context.rb', line 29 def self.Context(, = {}, = nil) defaults = { container_class: Context::Container, replica_class: Context::Store::IndifferentAccess } Context.build(, , **defaults.merge( Hash() )) end |