Class: Dry::Container::Namespace
- Inherits:
-
Object
- Object
- Dry::Container::Namespace
- Defined in:
- lib/dry/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::Container::Namespace
constructor
Create a new namespace.
Constructor Details
#initialize(name) { ... } ⇒ Dry::Container::Namespace
Create a new namespace
38 39 40 41 |
# File 'lib/dry/container/namespace.rb', line 38 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.
26 27 28 |
# File 'lib/dry/container/namespace.rb', line 26 def block @block end |
#name ⇒ Mixed (readonly)
Returns The namespace (name).
24 25 26 |
# File 'lib/dry/container/namespace.rb', line 24 def name @name end |