Module: SmartCore::Container::DefinitionDSL::ClassMethods Private
- Defined in:
- lib/smart_core/container/definition_dsl.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #compose(container_klass) ⇒ void
- #freeze_state! ⇒ void
- #namespace(namespace_name, &dependencies_definition) ⇒ void
- #register(dependency_name, memoize: SmartCore::Container::Registry::DEFAULT_MEMOIZATION_BEHAVIOR, &dependency_definition) ⇒ void
Instance Method Details
#compose(container_klass) ⇒ void
This method returns an undefined value.
92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/smart_core/container/definition_dsl.rb', line 92 def compose(container_klass) @__container_definition_lock__.write_sync do __container_definition_commands__ << Commands::Definition::Compose.new( container_klass ) __container_instantiation_commands__ << Commands::Instantiation::Compose.new( container_klass ) end end |
#freeze_state! ⇒ void
This method returns an undefined value.
108 109 110 111 112 |
# File 'lib/smart_core/container/definition_dsl.rb', line 108 def freeze_state! @__container_definition_lock__.write_sync do __container_instantiation_commands__ << Commands::Instantiation::FreezeState.new end end |
#namespace(namespace_name, &dependencies_definition) ⇒ void
This method returns an undefined value.
55 56 57 58 59 60 61 62 63 |
# File 'lib/smart_core/container/definition_dsl.rb', line 55 def namespace(namespace_name, &dependencies_definition) @__container_definition_lock__.write_sync do DependencyCompatability::Definition.prevent_dependency_overlap!(self, namespace_name) __container_definition_commands__ << Commands::Definition::Namespace.new( namespace_name, dependencies_definition ) end end |
#register(dependency_name, memoize: SmartCore::Container::Registry::DEFAULT_MEMOIZATION_BEHAVIOR, &dependency_definition) ⇒ void
This method returns an undefined value.
73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/smart_core/container/definition_dsl.rb', line 73 def register( dependency_name, memoize: SmartCore::Container::Registry::DEFAULT_MEMOIZATION_BEHAVIOR, &dependency_definition ) @__container_definition_lock__.write_sync do DependencyCompatability::Definition.prevent_namespace_overlap!(self, dependency_name) __container_definition_commands__ << Commands::Definition::Register.new( dependency_name, dependency_definition, memoize ) end end |