Module: Aux::Pluggable
- Defined in:
- lib/aux/pluggable.rb,
lib/aux/pluggable/connector.rb,
lib/aux/pluggable/utilities.rb,
lib/aux/pluggable/dependency.rb,
lib/aux/pluggable/class_methods.rb
Overview
Describes interface that makes any class able to register itself as well as resolve dependencies rubocop:disable Style/ClassVars
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
Class Method Summary collapse
- .configure {|pluggable, registry| ... } ⇒ Object
-
.included(base) ⇒ Object
Extends the including class with ClassMethods and initializes a new Connector instance.
- .registry ⇒ Aux::Registry
- .registry=(registry) ⇒ Object
Class Method Details
.configure {|pluggable, registry| ... } ⇒ Object
28 29 30 |
# File 'lib/aux/pluggable.rb', line 28 def self.configure yield(self, @@registry) if block_given? end |
.included(base) ⇒ Object
Extends the including class with ClassMethods and initializes a new Connector instance
17 18 19 20 21 22 23 |
# File 'lib/aux/pluggable.rb', line 17 def self.included(base) base.extend(ClassMethods) base.class_eval do @_pluggable = Connector.new(self, @@registry) end end |
.registry ⇒ Aux::Registry
38 39 40 |
# File 'lib/aux/pluggable.rb', line 38 def self.registry @@registry end |
.registry=(registry) ⇒ Object
33 34 35 |
# File 'lib/aux/pluggable.rb', line 33 def self.registry=(registry) @@registry = registry end |