Module: Plugins::ComponentMixin::ClassMethods
- Defined in:
- lib/plugins/component_mixin.rb
Instance Method Summary collapse
-
#plugin_loader(&block) ⇒ Object
Get or define the plugin loader.
Instance Method Details
#plugin_loader(&block) ⇒ Object
Get or define the plugin loader.
This block will be used to load a plugin given the value passed to the plugin
instance method. It’s the responsibility of this block to translate the inputted value into either a Class that extends Plugin or a Proc.
If for a particular value you wish to not perform any translation, return falsey.
20 21 22 23 24 25 26 |
# File 'lib/plugins/component_mixin.rb', line 20 def plugin_loader(&block) if block_given? @_plugin_loader = block else @_plugin_loader end end |