Class: SmartCore::Container::DefinitionDSL::Commands::Definition::Compose Private

Inherits:
Base
  • Object
show all
Defined in:
lib/smart_core/container/definition_dsl/commands/definition/compose.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.7.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:

Raises:

Since:

  • 0.7.0



12
13
14
15
16
17
18
19
# File 'lib/smart_core/container/definition_dsl/commands/definition/compose.rb', line 12

def initialize(container_klass)
  raise(
    SmartCore::ArgumentError,
    'Container class should be a subtype of Quantum::Container'
  ) unless container_klass < SmartCore::Container

  @container_klass = container_klass
end

Instance Method Details

#call(registry) ⇒ 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:

Since:

  • 0.7.0



26
27
28
# File 'lib/smart_core/container/definition_dsl/commands/definition/compose.rb', line 26

def call(registry)
  SmartCore::Container::RegistryBuilder.build_definitions(container_klass, registry)
end

#dupSmartCore::Container::DefinitionDSL::Commands::Definition::Compose

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.



34
35
36
# File 'lib/smart_core/container/definition_dsl/commands/definition/compose.rb', line 34

def dup
  self.class.new(container_klass)
end