Module: Plugins::ComponentMixin

Defined in:
lib/plugins/component_mixin.rb

Overview

Intended to be mixed into any class utilizing the plugins functionality.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
# File 'lib/plugins/component_mixin.rb', line 5

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#plugin(*args, &block) ⇒ Object

Add a plugin.



41
42
43
# File 'lib/plugins/component_mixin.rb', line 41

def plugin(*args, &block)
  plugins.add(*args, &block)
end

#pluginsObject

Reference to the Plugins instance for the component.



35
36
37
# File 'lib/plugins/component_mixin.rb', line 35

def plugins
  @plugins ||= Plugins.new(self, &self.class.plugin_loader)
end