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

Instance Method Details

#rant_doneObject

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 :-)

Returns:

  • (Boolean)

22
23
24
# File 'lib/rant/plugin_methods.rb', line 22

def rant_plugin?
	true
end

#rant_plugin_initObject

Called immediately after registration.


26
27
# File 'lib/rant/plugin_methods.rb', line 26

def rant_plugin_init
end

#rant_plugin_nameObject

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_stopObject

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_typeObject

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_quitObject

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_startObject

Called before rant runs the first task.


29
30
# File 'lib/rant/plugin_methods.rb', line 29

def rant_start
end