Class: Dry::Container::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/dry/container/mixin.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.



23
24
25
26
27
28
29
30
31
# File 'lib/dry/container/mixin.rb', line 23

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



14
15
16
# File 'lib/dry/container/mixin.rb', line 14

def namespace_separator
  @namespace_separator
end

#registryObject



20
21
22
# File 'lib/dry/container/mixin.rb', line 20

def registry
  @registry
end

#resolverObject



17
18
19
# File 'lib/dry/container/mixin.rb', line 17

def resolver
  @resolver
end