Class: SmartCore::Injection::Injector::InjectionSettings Private
- Inherits:
-
Object
- Object
- SmartCore::Injection::Injector::InjectionSettings
- Defined in:
- lib/smart_core/injection/injector/injection_settings.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: IncompatabilityControl
Constant Summary collapse
- DEFAULT_IMPORTS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{}.freeze
- DEFAULT_ACCESS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
:public
- ACCESS_MARKS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
%i[public protected private].freeze
- DEFAULT_BINDING_STRATEGY =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
:dynamic
- BINDING_STRATEGIES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
%i[static dynamic].freeze
- DEFAULT_MEMOIZE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
false
- EMPTY_CONTAINER_DESTINATION =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
nil
Instance Attribute Summary collapse
- #access ⇒ Symbol readonly private
- #bind ⇒ Symbol readonly private
- #container_set ⇒ SmartCore::Injection::Injector::ContainerSet readonly private
- #from ⇒ NilClass, <SmartCore::Container> readonly private
- #imports ⇒ Hash<String|Symbol,String> readonly private
- #injectable ⇒ Class, Module readonly private
- #memoize ⇒ Boolean readonly private
Instance Method Summary collapse
- #bind_dynamic? ⇒ Boolean private
- #bind_static? ⇒ Boolean private
- #class_level_injectable ⇒ Class private
- #each_import(&block) {|import_key, import_path| ... } ⇒ Enumerable private
- #initialize(injectable, container_set, imports, memoize: DEFAULT_MEMOIZE, access: DEFAULT_ACCESS, bind: DEFAULT_BINDING_STRATEGY, from: EMPTY_CONTAINER_DESTINATION) ⇒ void constructor private
- #instance_level_injectable ⇒ Class, Module private
Constructor Details
#initialize(injectable, container_set, imports, memoize: DEFAULT_MEMOIZE, access: DEFAULT_ACCESS, bind: DEFAULT_BINDING_STRATEGY, from: EMPTY_CONTAINER_DESTINATION) ⇒ 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.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 103 def initialize( injectable, container_set, imports, memoize: DEFAULT_MEMOIZE, access: DEFAULT_ACCESS, bind: DEFAULT_BINDING_STRATEGY, from: EMPTY_CONTAINER_DESTINATION ) IncompatabilityControl.prevent_incompatabilities!( injectable, imports, memoize, access, bind, from ) @injectable = injectable @container_set = container_set @imports = imports @memoize = memoize @access = access @bind = bind @from = from end |
Instance Attribute Details
#access ⇒ Symbol (readonly)
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.
60 61 62 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 60 def access @access end |
#bind ⇒ Symbol (readonly)
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.
66 67 68 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 66 def bind @bind end |
#container_set ⇒ SmartCore::Injection::Injector::ContainerSet (readonly)
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.
84 85 86 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 84 def container_set @container_set end |
#from ⇒ NilClass, <SmartCore::Container> (readonly)
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.
72 73 74 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 72 def from @from end |
#imports ⇒ Hash<String|Symbol,String> (readonly)
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.
54 55 56 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 54 def imports @imports end |
#injectable ⇒ Class, Module (readonly)
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.
90 91 92 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 90 def injectable @injectable end |
#memoize ⇒ Boolean (readonly)
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.
78 79 80 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 78 def memoize @memoize end |
Instance Method Details
#bind_dynamic? ⇒ Boolean
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.
150 151 152 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 150 def bind_dynamic? bind == :dynamic end |
#bind_static? ⇒ Boolean
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.
158 159 160 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 158 def bind_static? bind == :static end |
#class_level_injectable ⇒ Class
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.
142 143 144 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 142 def class_level_injectable class << injectable; self; end end |
#each_import(&block) {|import_key, import_path| ... } ⇒ Enumerable
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.
170 171 172 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 170 def each_import(&block) block_given? ? imports.each_pair(&block) : imports.each_pair end |
#instance_level_injectable ⇒ Class, Module
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.
134 135 136 |
# File 'lib/smart_core/injection/injector/injection_settings.rb', line 134 def instance_level_injectable injectable end |