Class: SmartCore::Container::DependencyCompatability::Registry Private
- Defined in:
- lib/smart_core/container/dependency_compatability/registry.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.
Class Method Summary collapse
- .potential_dependency_overlap?(registry, namespace_name) ⇒ Boolean private
- .potential_namespace_overlap?(registry, dependency_name) ⇒ Boolean private
Methods inherited from Abstract
prevent_dependency_overlap!, prevent_namespace_overlap!
Class Method Details
.potential_dependency_overlap?(registry, namespace_name) ⇒ 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.
28 29 30 31 32 33 34 |
# File 'lib/smart_core/container/dependency_compatability/registry.rb', line 28 def potential_dependency_overlap?(registry, namespace_name) registry.any? do |registered_dependency| next unless registered_dependency.is_a?(SmartCore::Container::Dependency) # NOTE: registered_dependency is a dependency/memoized dependency registered_dependency.external_name == namespace_name end end |
.potential_namespace_overlap?(registry, dependency_name) ⇒ 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.
14 15 16 17 18 19 20 |
# File 'lib/smart_core/container/dependency_compatability/registry.rb', line 14 def potential_namespace_overlap?(registry, dependency_name) registry.any? do |registered_dependency| next unless registered_dependency.is_a?(SmartCore::Container::Namespace) # NOTE: registered_dependency is a namespace registered_dependency.external_name == dependency_name end end |