Sha256: 4ab6b0f06a30b8afc3088a2b912d2ba7ee0242c251f995f6733359b150b4de66
Contents?: true
Size: 469 Bytes
Versions: 14
Compression:
Stored size: 469 Bytes
Contents
# frozen_string_literal: true module Dry module System class ProviderRegistry include Enumerable attr_reader :items def initialize @items = [] end def each(&block) items.each(&block) end def register(identifier, options) items << Provider.new(identifier, options) end def [](identifier) detect { |provider| provider.identifier == identifier } end end end end
Version data entries
14 entries across 14 versions & 1 rubygems