Class: SmartCore::Container::MemoizedDependency Private
- Inherits:
-
Dependency
- Object
- Entity
- Dependency
- SmartCore::Container::MemoizedDependency
- Defined in:
- lib/smart_core/container/memoized_dependency.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
- #call ⇒ Any private
- #initialize(external_name, dependency_definition, **options) ⇒ void constructor private
Constructor Details
#initialize(external_name, dependency_definition, **options) ⇒ 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.
TODO:
option list
16 17 18 19 |
# File 'lib/smart_core/container/memoized_dependency.rb', line 16 def initialize(external_name, dependency_definition, **) @memoized_call = nil super end |
Instance Method Details
#call ⇒ Any
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.
25 26 27 |
# File 'lib/smart_core/container/memoized_dependency.rb', line 25 def call thread_safe { @memoized_call ||= dependency_definition.call } end |