module Plugins::ComponentMixin::ClassMethods

Public Instance Methods

plugin_loader(&block) click to toggle source

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.

# File lib/plugins/component_mixin.rb, line 20
def plugin_loader(&block)
  if block_given?
    @_plugin_loader = block
  else
    @_plugin_loader
  end
end