Class: SmartCore::Injection::Injector Private
- Inherits:
-
Object
- Object
- SmartCore::Injection::Injector
- Defined in:
- lib/smart_core/injection/injector.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.
Defined Under Namespace
Modules: Modulizer, Strategies Classes: ContainerSet, InjectionSettings
Instance Method Summary collapse
- #associated_containers ⇒ Array<SmartCore::Container> private
- #duplicate_for(another_injectable) ⇒ SmartCore::Injection::Injector private
- #initialize(injectable) ⇒ void constructor private
- #inject(imports, memoize, access, bind, from) ⇒ void private
- #inject_static(imports, memoize, access, bind, from) ⇒ void private
- #register_container(*containers) ⇒ void private
Constructor Details
#initialize(injectable) ⇒ 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.
16 17 18 19 20 |
# File 'lib/smart_core/injection/injector.rb', line 16 def initialize(injectable) @injectable = injectable @linked_containers = SmartCore::Injection::Injector::ContainerSet.new @access_lock = SmartCore::Engine::Lock.new end |
Instance Method Details
#associated_containers ⇒ Array<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.
61 62 63 |
# File 'lib/smart_core/injection/injector.rb', line 61 def associated_containers thread_safe { linked_containers.list } end |
#duplicate_for(another_injectable) ⇒ SmartCore::Injection::Injector
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.
70 71 72 |
# File 'lib/smart_core/injection/injector.rb', line 70 def duplicate_for(another_injectable) thread_safe { create_duplicate(another_injectable) } end |
#inject(imports, memoize, access, bind, from) ⇒ 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.
31 32 33 |
# File 'lib/smart_core/injection/injector.rb', line 31 def inject(imports, memoize, access, bind, from) thread_safe { inject_instance_method(imports, memoize, access, bind, from) } end |
#inject_static(imports, memoize, access, bind, from) ⇒ 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.
44 45 46 |
# File 'lib/smart_core/injection/injector.rb', line 44 def inject_static(imports, memoize, access, bind, from) thread_safe { inject_class_method(imports, memoize, access, bind, from) } end |
#register_container(*containers) ⇒ 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.
53 54 55 |
# File 'lib/smart_core/injection/injector.rb', line 53 def register_container(*containers) thread_safe { link_container(containers) } end |