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
[](identifier)
click to toggle source
# File lib/dry/system/provider_registry.rb, line 22 def [](identifier) detect { |provider| provider.identifier == identifier } end
each(&block)
click to toggle source
# File lib/dry/system/provider_registry.rb, line 14 def each(&block) items.each(&block) end
register(identifier, options)
click to toggle source
# File lib/dry/system/provider_registry.rb, line 18 def register(identifier, options) items << Provider.new(identifier, options) end