Class: SmartCore::Container::Namespace Private
- Defined in:
- lib/smart_core/container/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 Entity
Instance Method Summary collapse
- #append_definitions(dependency_definitions) ⇒ void private
- #call ⇒ SmartCore::Container private
- #initialize(external_name) ⇒ void constructor private
Constructor Details
#initialize(external_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.
11 12 13 14 15 16 |
# File 'lib/smart_core/container/namespace.rb', line 11 def initialize(external_name) @container = Class.new(SmartCore::Container) @container_instance = nil @access_lock = Mutex.new super(external_name) end |
Instance Method Details
#append_definitions(dependency_definitions) ⇒ 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.
23 24 25 |
# File 'lib/smart_core/container/namespace.rb', line 23 def append_definitions(dependency_definitions) container.instance_eval(&dependency_definitions) end |
#call ⇒ 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.
31 32 33 |
# File 'lib/smart_core/container/namespace.rb', line 31 def call thread_safe { @container_instance ||= container.new } end |