Class: SmartCore::Container::Entities::Namespace Private
- Defined in:
- lib/smart_core/container/entities/namespace.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #append_definitions(dependencies_definition) ⇒ void private
- #freeze! ⇒ void private
- #initialize(namespace_name) ⇒ void constructor private
- #resolve ⇒ SmartCore::Container private
Constructor Details
#initialize(namespace_name) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 20 21 22 |
# File 'lib/smart_core/container/entities/namespace.rb', line 17 def initialize(namespace_name) super(namespace_name) @container_klass = Class.new(SmartCore::Container) @container_instance = nil @lock = SmartCore::Container::ArbitaryLock.new end |
Instance Method Details
#append_definitions(dependencies_definition) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
37 38 39 |
# File 'lib/smart_core/container/entities/namespace.rb', line 37 def append_definitions(dependencies_definition) thread_safe { container_klass.instance_eval(&dependencies_definition) } end |
#freeze! ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
45 46 47 |
# File 'lib/smart_core/container/entities/namespace.rb', line 45 def freeze! thread_safe { container_instance.freeze! } end |
#resolve ⇒ SmartCore::Container
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 |
# File 'lib/smart_core/container/entities/namespace.rb', line 28 def resolve thread_safe { container_instance } end |