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.
21 22 23 24 |
# File 'lib/pluginator/extendable_autodetect.rb', line 21 def initialize(group, = {}) super(group, ) extend_plugins([:extends]||[]) end |
Instance Method Details
#extend_plugins(extends) ⇒ Object
Extend pluginator instance with given extensions
29 30 31 32 33 |
# File 'lib/pluginator/extendable_autodetect.rb', line 29 def extend_plugins(extends) extensions_matching(extends).each do |plugin| extend plugin end end |