Module: Rant::PluginMethods
- Included in:
- Rant::Plugin::Configure
- Defined in:
- lib/rant/plugin_methods.rb
Overview
This module defines all instance methods required for an Rant plugin. Additionally, each plugin class has to define the class method plugin_create
.
Include this module in your plugin class to ensure your plugin won’t break when Rant requires new methods.
Instance Method Summary collapse
-
#rant_done ⇒ Object
Called when rant successfully processed all required tasks.
-
#rant_plugin? ⇒ Boolean
This is used for verification.
-
#rant_plugin_init ⇒ Object
Called immediately after registration.
-
#rant_plugin_name ⇒ Object
Please override this method.
-
#rant_plugin_stop ⇒ Object
You should “shut down” your plugin as response to this method.
-
#rant_plugin_type ⇒ Object
The type of your plugin as string.
-
#rant_quit ⇒ Object
Called immediately before the rant application return control to the caller.
-
#rant_start ⇒ Object
Called before rant runs the first task.
Instance Method Details
#rant_done ⇒ Object
Called when rant successfully processed all required tasks.
32 33 |
# File 'lib/rant/plugin_methods.rb', line 32 def rant_done end |
#rant_plugin? ⇒ Boolean
This is used for verification. Usually you don’t want to change this for your plugin :-)
22 23 24 |
# File 'lib/rant/plugin_methods.rb', line 22 def rant_plugin? true end |
#rant_plugin_init ⇒ Object
Called immediately after registration.
26 27 |
# File 'lib/rant/plugin_methods.rb', line 26 def rant_plugin_init end |
#rant_plugin_name ⇒ Object
Please override this method. This is used as a name for your plugin instance.
17 18 19 |
# File 'lib/rant/plugin_methods.rb', line 17 def rant_plugin_name "rant plugin object" end |
#rant_plugin_stop ⇒ Object
You should “shut down” your plugin as response to this method.
35 36 |
# File 'lib/rant/plugin_methods.rb', line 35 def rant_plugin_stop end |
#rant_plugin_type ⇒ Object
The type of your plugin as string.
12 13 14 |
# File 'lib/rant/plugin_methods.rb', line 12 def rant_plugin_type "rant plugin" end |
#rant_quit ⇒ Object
Called immediately before the rant application return control to the caller.
39 40 |
# File 'lib/rant/plugin_methods.rb', line 39 def rant_quit end |
#rant_start ⇒ Object
Called before rant runs the first task.
29 30 |
# File 'lib/rant/plugin_methods.rb', line 29 def rant_start end |