Class: Pluginator::ExtendableAutodetect
- Inherits:
-
Autodetect
- Object
- Group
- Autodetect
- Pluginator::ExtendableAutodetect
- Defined in:
- lib/pluginator/extendable_autodetect.rb
Overview
Add extendability to Atudetect / Group
Instance Attribute Summary
Attributes inherited from Group
Instance Method Summary collapse
-
#extend_plugins(extends) ⇒ Object
Extend pluginator instance with given extensions.
-
#initialize(group, options = {}) ⇒ ExtendableAutodetect
constructor
Automatically load plugins for given group (and type) Extend instance with extensions if given.
Methods inherited from Autodetect
Methods inherited from Group
Constructor Details
#initialize(group, options = {}) ⇒ ExtendableAutodetect
Automatically load plugins for given group (and type) Extend instance with extensions if given.
41 42 43 44 |
# File 'lib/pluginator/extendable_autodetect.rb', line 41 def initialize(group, = {}) super(group, ) extend_plugins([:extends]||[]) end |
Instance Method Details
#extend_plugins(extends) ⇒ Object
Extend pluginator instance with given extensions
49 50 51 52 53 |
# File 'lib/pluginator/extendable_autodetect.rb', line 49 def extend_plugins(extends) extensions_matching(extends).each do |plugin| extend plugin end end |