Class: RJSV::Plugin
- Inherits:
-
Object
- Object
- RJSV::Plugin
- Defined in:
- lib/rjsv/plugin.rb
Overview
Abstract ‘class’ for creating initialization plagins. They are teachable for defining basic information and is the starting point for triggering functions using the init() function. If we are creating a custom plugin, we need to inherit this ‘class’ into its own ‘class’.
Instance Method Summary collapse
-
#arguments ⇒ Object
The method should pass an initialization method for all arguments of this plugin.
-
#description ⇒ Object
Description of the plugin that is printed to the CLI during help.
-
#init ⇒ Object
The method that is the main initialization block for the code that the plugin should execute.
-
#name ⇒ Object
This function is not mandatory and automatically defines the ‘module’ name according to the plugin ‘module’.
Instance Method Details
#arguments ⇒ Object
The method should pass an initialization method for all arguments of this plugin.
31 32 33 |
# File 'lib/rjsv/plugin.rb', line 31 def arguments abstract_error('arguments()') end |
#description ⇒ Object
Description of the plugin that is printed to the CLI during help.
14 15 16 |
# File 'lib/rjsv/plugin.rb', line 14 def description abstract_error('description()') end |
#init ⇒ Object
The method that is the main initialization block for the code that the plugin should execute.
40 41 42 |
# File 'lib/rjsv/plugin.rb', line 40 def init abstract_error('init()') end |
#name ⇒ Object
This function is not mandatory and automatically defines the ‘module’ name according to the plugin ‘module’.
23 24 25 |
# File 'lib/rjsv/plugin.rb', line 23 def name self.class.name.split('::')[-2].downcase end |