Class: Dry::Core::Container::Namespace
- Inherits:
-
Object
- Object
- Dry::Core::Container::Namespace
- Defined in:
- lib/dry/core/container/namespace.rb
Overview
Create a namespace to be imported
Instance Attribute Summary collapse
-
#block ⇒ Proc
readonly
The block to be executed when the namespace is imported.
-
#name ⇒ Mixed
readonly
The namespace (name).
Instance Method Summary collapse
-
#initialize(name) { ... } ⇒ Dry::Core::Container::Namespace
constructor
Create a new namespace.
Constructor Details
#initialize(name) { ... } ⇒ Dry::Core::Container::Namespace
Create a new namespace
40 41 42 43 |
# File 'lib/dry/core/container/namespace.rb', line 40 def initialize(name, &block) @name = name @block = block end |
Instance Attribute Details
#block ⇒ Proc (readonly)
Returns The block to be executed when the namespace is imported.
28 29 30 |
# File 'lib/dry/core/container/namespace.rb', line 28 def block @block end |
#name ⇒ Mixed (readonly)
Returns The namespace (name).
25 26 27 |
# File 'lib/dry/core/container/namespace.rb', line 25 def name @name end |