Module: SmartCore::Container::DependencyCompatability::Registry Private

Extended by:
General
Defined in:
lib/smart_core/container/dependency_compatability/registry.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Class Method Summary collapse

Methods included from General

potential_dependency_overlap?, potential_namespace_overlap?, 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.

Parameters:

Returns:

  • (Boolean)

Since:

  • 0.1.0



29
30
31
32
33
34
# File 'lib/smart_core/container/dependency_compatability/registry.rb', line 29

def potential_dependency_overlap?(registry, namespace_name)
  registry.any? do |(entity_name, entity)|
    next unless entity.is_a?(SmartCore::Container::Entities::Dependency)
    entity.dependency_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.

Parameters:

Returns:

  • (Boolean)

Since:

  • 0.1.0



16
17
18
19
20
21
# File 'lib/smart_core/container/dependency_compatability/registry.rb', line 16

def potential_namespace_overlap?(registry, dependency_name)
  registry.any? do |(entity_name, entity)|
    next unless entity.is_a?(SmartCore::Container::Entities::Namespace)
    entity.namespace_name == dependency_name
  end
end