Module: SmartCore::Container::DependencyCompatability::General Private

Included in:
Definition, Registry
Defined in:
lib/smart_core/container/dependency_compatability/general.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

Instance Method Summary collapse

Instance Method Details

#potential_dependency_overlap?(context, 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)

Raises:

  • (NoMethodError)

Since:

  • 0.1.0



56
57
58
59
60
# File 'lib/smart_core/container/dependency_compatability/general.rb', line 56

def potential_dependency_overlap?(context, namespace_name)
  # :nocov:
  raise NoMethodError
  # :nocov:
end

#potential_namespace_overlap?(context, 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)

Raises:

  • (NoMethodError)

Since:

  • 0.1.0



44
45
46
47
48
# File 'lib/smart_core/container/dependency_compatability/general.rb', line 44

def potential_namespace_overlap?(context, dependency_name)
  # :nocov:
  raise NoMethodError
  # :nocov:
end

#prevent_dependency_overlap!(context, namespace_name) ⇒ 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.

This method returns an undefined value.

Parameters:

Raises:

Since:

  • 0.1.0



30
31
32
33
34
35
36
# File 'lib/smart_core/container/dependency_compatability/general.rb', line 30

def prevent_dependency_overlap!(context, namespace_name)
  raise(
    SmartCore::Container::NamespaceOverDependencyOverlapError,
    "Trying to overlap already registered '#{namespace_name}' dependency " \
    "with '#{namespace_name}' namespace!"
  ) if potential_dependency_overlap?(context, namespace_name)
end

#prevent_namespace_overlap!(context, dependency_name) ⇒ 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.

This method returns an undefined value.

Parameters:

Raises:

Since:

  • 0.1.0



14
15
16
17
18
19
20
# File 'lib/smart_core/container/dependency_compatability/general.rb', line 14

def prevent_namespace_overlap!(context, dependency_name)
  raise(
    SmartCore::Container::DependencyOverNamespaceOverlapError,
    "Trying to overlap already registered '#{dependency_name}' namespace " \
    "with '#{dependency_name}' dependency!"
  ) if potential_namespace_overlap?(context, dependency_name)
end