]> gitweb.michael.orlitzky.com - mailshears.git/blob - lib/common/plugin.rb
0687989fe03169e3aa2e4d9c256f30bf9cbe8b67
[mailshears.git] / lib / common / plugin.rb
1 # All plugins should include this module. It defines the basic
2 # operations that all plugins are supposed to support.
3 module Plugin
4
5 def Plugin.included(c)
6 # Callback, called whenever another class or module includes this
7 # one. The parameter given is the name of the class or module
8 # that included us.
9 @includers ||= []
10 @includers << c
11 end
12
13 def Plugin.includers
14 return @includers
15 end
16
17 def describe_domain(domain)
18 # Provide a "description" of the domain. This is output along
19 # with the domain name and can be anything of use to the system
20 # administrator.
21 raise NotImplementedError
22 end
23
24 def describe_account(account)
25 # Provide a "description" of the account. This is output along
26 # with the domain name and can be anything of use to the system
27 # administrator.
28 raise NotImplementedError
29 end
30
31 end