Module: Dry::Plugins::DSL
- Defined in:
- lib/dry/plugins/dsl.rb
Overview
Plug-ins DSL
Class Method Summary collapse
- .extended(plugins) ⇒ Object private
Instance Method Summary collapse
- #host ⇒ Module, Host::DSL
- #plugins_registry ⇒ Registry
- #register(name, plugin) ⇒ Plugin
- #resolve(name) ⇒ Plugin
Class Method Details
.extended(plugins) ⇒ Object
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.
10 11 12 13 14 15 16 17 |
# File 'lib/dry/plugins/dsl.rb', line 10 def self.extended(plugins) super(plugins) plugins.extend SingleForwardable plugins.def_single_delegators Plugins.config.registry_method, :register, :resolve, :[] end |
Instance Method Details
#host ⇒ Module, Host::DSL
20 21 22 |
# File 'lib/dry/plugins/dsl.rb', line 20 def host @host ||= Inflecto.constantize(name.gsub(/::[^:]+$/, '')) end |