Module: Challah::Plugins

Included in:
Challah
Defined in:
lib/challah/plugins.rb

Overview

Plugins are used to extend the functionality of Challah.

Defined Under Namespace

Classes: Plugin

Instance Method Summary collapse

Instance Method Details

#pluginsObject

Get the list of all plugins



37
38
39
# File 'lib/challah/plugins.rb', line 37

def plugins
  @plugins
end

#register_plugin(name, &block) ⇒ Object

Register a new plugin.



30
31
32
33
34
# File 'lib/challah/plugins.rb', line 30

def register_plugin(name, &block)
  plugin = Plugin.new
  plugin.instance_eval(&block)
  @plugins[name] = plugin
end