Class: Dry::Core::Container::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/dry/core/container/config.rb

Constant Summary collapse

DEFAULT_NAMESPACE_SEPARATOR =
"."
DEFAULT_RESOLVER =
Resolver.new
DEFAULT_REGISTRY =
Registry.new

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(namespace_separator: DEFAULT_NAMESPACE_SEPARATOR, resolver: DEFAULT_RESOLVER, registry: DEFAULT_REGISTRY) ⇒ Config

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.

Returns a new instance of Config.



22
23
24
25
26
27
28
29
30
# File 'lib/dry/core/container/config.rb', line 22

def initialize(
  namespace_separator: DEFAULT_NAMESPACE_SEPARATOR,
  resolver: DEFAULT_RESOLVER,
  registry: DEFAULT_REGISTRY
)
  @namespace_separator = namespace_separator
  @resolver = resolver
  @registry = registry
end

Instance Attribute Details

#namespace_separatorObject



13
14
15
# File 'lib/dry/core/container/config.rb', line 13

def namespace_separator
  @namespace_separator
end

#registryObject



19
20
21
# File 'lib/dry/core/container/config.rb', line 19

def registry
  @registry
end

#resolverObject



16
17
18
# File 'lib/dry/core/container/config.rb', line 16

def resolver
  @resolver
end