Class: SmartCore::Container::DefinitionDSL::Commands::Definition::Namespace Private
- Inherits:
-
Base
- Object
- Base
- SmartCore::Container::DefinitionDSL::Commands::Definition::Namespace
- Defined in:
- lib/smart_core/container/definition_dsl/commands/definition/namespace.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.
Instance Attribute Summary collapse
- #namespace_name ⇒ String readonly private
Instance Method Summary collapse
- #call(registry) ⇒ void private
- #dup ⇒ SmartCore::Container::DefinitionDSL::Commands::Definition::Namespace private
- #initialize(namespace_name, dependencies_definition) ⇒ void constructor private
Methods inherited from Base
inheritable=, inheritable?, #inheritable?, inherited
Constructor Details
#initialize(namespace_name, dependencies_definition) ⇒ 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.
22 23 24 25 26 27 |
# File 'lib/smart_core/container/definition_dsl/commands/definition/namespace.rb', line 22 def initialize(namespace_name, dependencies_definition) SmartCore::Container::KeyGuard.indifferently_accessable_key(namespace_name).tap do |name| @namespace_name = name @dependencies_definition = dependencies_definition end end |
Instance Attribute Details
#namespace_name ⇒ String (readonly)
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.
14 15 16 |
# File 'lib/smart_core/container/definition_dsl/commands/definition/namespace.rb', line 14 def namespace_name @namespace_name 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.
34 35 36 |
# File 'lib/smart_core/container/definition_dsl/commands/definition/namespace.rb', line 34 def call(registry) registry.register_namespace(namespace_name, &dependencies_definition) end |
#dup ⇒ SmartCore::Container::DefinitionDSL::Commands::Definition::Namespace
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.
42 43 44 |
# File 'lib/smart_core/container/definition_dsl/commands/definition/namespace.rb', line 42 def dup self.class.new(namespace_name, dependencies_definition) end |