Sha256: 05a0be910920ec139089c5a4e2fba947a28ee34be16ae2b0fe6128508d7d8336
Contents?: true
Size: 707 Bytes
Versions: 7
Compression:
Stored size: 707 Bytes
Contents
# frozen_string_literal: true require "dry/system/provider" require "dry/system/provider_registry" module Dry module System # Register external component provider # # @api public def self.register_provider(identifier, options) providers.register(identifier, options) providers[identifier].load_components self end # Register an external component that can be booted within other systems # # @api public def self.register_component(identifier, provider:, &block) providers[provider].register_component(identifier, block) self end # @api private def self.providers @providers ||= ProviderRegistry.new end end end
Version data entries
7 entries across 7 versions & 1 rubygems