Class: Sbuilder::SnippetLoaderPlugin
- Inherits:
-
LoaderPluginRoot
- Object
- LoaderPluginRoot
- Sbuilder::SnippetLoaderPlugin
- Includes:
- SnippetLoaderPluginMixer
- Defined in:
- lib/sbuilder/facade/snippet_loader_plugin.rb
Direct Known Subclasses
Constant Summary
Constants inherited from LoaderPluginRoot
Constants included from Utils::MyLogger
Constructor and Object Initialize collapse
-
#initialize(options = {}) ⇒ SnippetLoaderPlugin
constructor
——————————————————————.
Configure Plugin collapse
-
.configure(configuration) ⇒ Object
Configure API loader - MUST be implemented by plugin class.
Register snippets to sbuilder collapse
-
#doRegisterSnippets(snippetsDefs) ⇒ Object
Abstract method, which must be implemented by concrete snippet loader plugin.
Methods included from SnippetLoaderPluginMixer
#registerMetatype, #registerSnippets, #setSnippetFacade, #snippetFacade, validateProperties
Methods inherited from LoaderPluginRoot
#configure, #doConfigure, #logger, #oneOf, validateProperties, #validateProperties
Methods included from Utils::MyLogger
Constructor Details
#initialize(options = {}) ⇒ SnippetLoaderPlugin
24 25 26 |
# File 'lib/sbuilder/facade/snippet_loader_plugin.rb', line 24 def initialize( = {} ) super( ) end |
Class Method Details
.configure(configuration) ⇒ Object
Configure API loader - MUST be implemented by plugin class
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/sbuilder/facade/snippet_loader_plugin.rb', line 36 def self.configure( configuration ) raise PluginException.new <<-EOS unless configuration.nil? Plugin classes should implement class method #{__method__} This error is raised when using 'configuration' -property in 'extend.loaders' array entry. For example: extend: loaders: - className: Sbuilder::XXXX::Plugin gem: sbuilder-xxxx configuration: any value and the plugin class (e.g. Sbuilder::XXXX::Plugin) does not implement class method '.#{__method__}' EOS end |
Instance Method Details
#doRegisterSnippets(snippetsDefs) ⇒ Object
Abstract method, which must be implemented by concrete snippet loader plugin
This method should use ‘handOver’ method, which passes snippet, along with metadata, via snippet loader snippetFacade to sbuilder.
67 68 69 |
# File 'lib/sbuilder/facade/snippet_loader_plugin.rb', line 67 def doRegisterSnippets( snippetsDefs ) raise PluginException.new "Missing implementation for 'doRegisterSnippets'" end |