Module: Doing::Plugins
- Defined in:
- lib/doing/plugin_manager.rb
Overview
Plugin handling
Class Method Summary collapse
-
.available_plugins(type: :export) ⇒ Array
Return array of available plugin names.
-
.list_plugins(options = {}) ⇒ Object
List available plugins to stdout.
-
.load_plugins(add_dir = nil) ⇒ Object
Load plugins from plugins folder.
-
.plugin_names(type: :export, separator: '|') ⇒ String
Return string version of plugin names.
-
.plugin_regex(type: :export) ⇒ Regexp
Return a regular expression of all plugin triggers for type.
-
.plugin_templates(type: :export) ⇒ Array
Return array of available template names.
-
.plugins ⇒ Hash
Storage for registered plugins.
-
.plugins_path(add_dir = nil) ⇒ Array
Setup the plugin search path.
-
.register(title, type, klass) ⇒ Boolean
Register a plugin.
-
.template_for_trigger(trigger, type: :export, save_to: nil) ⇒ String
Find and return the appropriate template for a trigger string.
-
.template_regex(type: :export) ⇒ Regexp
Return a regular expression of all template triggers for type.
-
.user_home ⇒ Object
Return the user's home directory.
-
.valid_type(type, default: nil) ⇒ Symbol
Converts a partial symbol to a valid plugin type, e.g.
-
.validate_plugin(title, type, klass) ⇒ Object
Verifies that a plugin is properly configured with necessary methods for its type.
Class Method Details
.available_plugins(type: :export) ⇒ Array
Return array of available plugin names
.list_plugins(options = {}) ⇒ Object
List available plugins to stdout
.load_plugins(add_dir = nil) ⇒ Object
Load plugins from plugins folder
.plugin_names(type: :export, separator: '|') ⇒ String
Return string version of plugin names
.plugin_regex(type: :export) ⇒ Regexp
Return a regular expression of all plugin triggers for type
.plugin_templates(type: :export) ⇒ Array
Return array of available template names
.plugins ⇒ Hash
Storage for registered plugins. Hash with :import and :export keys containing hashes of available plugins.
.plugins_path(add_dir = nil) ⇒ Array
Setup the plugin search path
.register(title, type, klass) ⇒ Boolean
Register a plugin
.template_for_trigger(trigger, type: :export, save_to: nil) ⇒ String
Find and return the appropriate template for a trigger string. Outputs a string that can be written out to the terminal for redirection
.template_regex(type: :export) ⇒ Regexp
Return a regular expression of all template triggers for type
.user_home ⇒ Object
Return the user's home directory
.valid_type(type, default: nil) ⇒ Symbol
Converts a partial symbol to a valid plugin type, e.g. :imp => :import
.validate_plugin(title, type, klass) ⇒ Object
Verifies that a plugin is properly configured with necessary methods for its type. If the plugin fails validation, a PluginUncallable exception will be raised.