Module: SmartCore::Container::DefinitionDSL::ClassMethods Private

Defined in:
lib/smart_core/container/definition_dsl.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.5.0

Instance Method Summary collapse

Instance Method Details

#namespace(namespace_name, &dependency_definitions) ⇒ void

This method returns an undefined value.

Parameters:

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

Since:

  • 0.5.0



45
46
47
48
49
# File 'lib/smart_core/container/definition_dsl.rb', line 45

def namespace(namespace_name, &dependency_definitions)
  __commands__ << SmartCore::Container::Commands::Namespace.new(
    namespace_name, dependency_definitions
  )
end

#register(dependency_name, **options, &dependency_definition) ⇒ void

TODO:

option list

This method returns an undefined value.

Parameters:

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

Since:

  • 0.5.0



60
61
62
63
64
# File 'lib/smart_core/container/definition_dsl.rb', line 60

def register(dependency_name, **options, &dependency_definition)
  __commands__ << SmartCore::Container::Commands::Register.new(
    dependency_name, dependency_definition, **options
  )
end