Module: Sbuilder::SnippetLoaderPluginMixer
- Included in:
- SnippetLoaderPlugin
- Defined in:
- lib/sbuilder/facade/snippet_loader_plugin_mixer.rb
Overview
Mixer module to include to API loader plugins
Implement:
-
getter & setter for Snippet loader facade
Class Method Summary collapse
-
.validateProperties(hash, required_props, allowed_props) ⇒ Object
def validateProperties( hash, required_props, allowed_props ) SnippetLoaderPlugin.validateProperties( hash, required_props, allowed_props ) end.
Instance Method Summary collapse
-
#registerMetatype(metatype, desc) ⇒ Object
A method available for plugin sub class, allowing sub class to register metatype prio.
-
#registerSnippets(snippetsDefs) ⇒ Object
load.
-
#setSnippetFacade(facade) ⇒ Object
Sbuilder controller calls ‘setFacade’ when new API loader object is contstructed.
-
#snippetFacade ⇒ Sbuilder::ApiLoaderFacade
SnippetFacade to access Sbuilder servivices ( set in ‘setFacade’).
Class Method Details
.validateProperties(hash, required_props, allowed_props) ⇒ Object
def validateProperties( hash, required_props, allowed_props )
SnippetLoaderPlugin.validateProperties( hash, required_props, allowed_props )
end
48 49 50 |
# File 'lib/sbuilder/facade/snippet_loader_plugin_mixer.rb', line 48 def self.validateProperties( hash, required_props, allowed_props ) Sbuilder::Utils::Validate.validateProperties( hash, required_props, allowed_props ) end |
Instance Method Details
#registerMetatype(metatype, desc) ⇒ Object
A method available for plugin sub class, allowing sub class to register metatype prio
29 30 31 |
# File 'lib/sbuilder/facade/snippet_loader_plugin_mixer.rb', line 29 def registerMetatype( , desc ) snippetFacade.registerMetatype( , desc ) end |
#registerSnippets(snippetsDefs) ⇒ Object
load. snippetsDefs are passed un modified to plugin implementation
37 38 39 40 41 |
# File 'lib/sbuilder/facade/snippet_loader_plugin_mixer.rb', line 37 def registerSnippets( snippetsDefs ) # call implementation in concrete class logger.info "#{__method__}, snippetsDefs=#{snippetsDefs}" doRegisterSnippets( snippetsDefs ) end |
#setSnippetFacade(facade) ⇒ Object
Sbuilder controller calls ‘setFacade’ when new API loader object is contstructed. Sets instance variable ‘@facade’.
17 18 19 |
# File 'lib/sbuilder/facade/snippet_loader_plugin_mixer.rb', line 17 def setSnippetFacade( facade ) @snippetFacade = facade end |
#snippetFacade ⇒ Sbuilder::ApiLoaderFacade
Returns snippetFacade to access Sbuilder servivices ( set in ‘setFacade’).
22 23 24 |
# File 'lib/sbuilder/facade/snippet_loader_plugin_mixer.rb', line 22 def snippetFacade @snippetFacade end |