Class: SmartCore::Container::CommandDefiner Private

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_core/container/command_definer.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.

Since:

  • 0.5.0

Instance Method Summary collapse

Constructor Details

#initialize(container_klass) ⇒ 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.

Parameters:

Since:

  • 0.5.0



12
13
14
15
# File 'lib/smart_core/container/command_definer.rb', line 12

def initialize(container_klass)
  @container_klass = container_klass
  @access_lock = Mutex.new
end

Instance Method Details

#append_namespace(namespace_name, dependency_definitions) ⇒ 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:

  • namespace_name (String, Symbol)
  • dependency_definitions (Proc)

Since:

  • 0.5.0



23
24
25
26
27
28
29
# File 'lib/smart_core/container/command_definer.rb', line 23

def append_namespace(namespace_name, dependency_definitions)
  thread_safe do
    command = build_namespace_command(namespace_name, dependency_definitions)
    prevent_dependency_overlap!(command)
    append_command(command)
  end
end

#append_register(dependency_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.

This method returns an undefined value.

Parameters:

  • dependency_name (String, Symbol)
  • dependency_definition (Proc)
  • options (Hash<Symbol,Any>)

Since:

  • 0.5.0



38
39
40
41
42
43
44
# File 'lib/smart_core/container/command_definer.rb', line 38

def append_register(dependency_name, dependency_definition, options)
  thread_safe do
    command = build_register_command(dependency_name, dependency_definition, options)
    prevent_namespace_overlap!(command)
    append_command(command)
  end
end