class Dry::System::ProviderRegistry
Attributes
items[R]
Public Class Methods
new()
click to toggle source
# File lib/dry/system/provider_registry.rb, line 10 def initialize @items = [] end
Public Instance Methods
[](name)
click to toggle source
# File lib/dry/system/provider_registry.rb, line 22 def [](name) detect { |provider| provider.name == name } end
each(&block)
click to toggle source
# File lib/dry/system/provider_registry.rb, line 14 def each(&block) items.each(&block) end
register(name, options)
click to toggle source
# File lib/dry/system/provider_registry.rb, line 18 def register(name, options) items << Provider.new(name, options) end