Method: SmartCore::Container::DependencyCompatability::Definition.potential_namespace_overlap?

Defined in:
lib/smart_core/container/dependency_compatability/definition.rb

.potential_namespace_overlap?(container_klass, 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
22
# File 'lib/smart_core/container/dependency_compatability/definition.rb', line 16

def potential_namespace_overlap?(container_klass, dependency_name)
  anonymous_container = Class.new(container_klass).new
  anonymous_container.register(dependency_name, &(proc {}))
  false
rescue SmartCore::Container::DependencyOverNamespaceOverlapError
  true
end