]> gitweb.michael.orlitzky.com - mailshears.git/blob - lib/mv/mv_plugin.rb
Document everything with YARD and fix some bugs along the way.
[mailshears.git] / lib / mv / mv_plugin.rb
1 require 'common/plugin.rb'
2
3 # Plugins for moving (renaming) users. Moving domains is not supported.
4 #
5 module MvPlugin
6
7 # Absorb the subclass run() magic from the Plugin::Run module.
8 extend Plugin::Run
9
10 # The runner class associated with move plugins.
11 #
12 # @return [Class] the {MvRunner} class.
13 #
14 def self.runner()
15 return MvRunner
16 end
17
18
19 # The "dummy" runner class associated with move plugins.
20 #
21 # @return [Class] the {MvDummyRunner} class.
22 #
23 def self.dummy_runner()
24 return MvDummyRunner
25 end
26
27
28 # The interface for the "move a user" operation. Subclasses need to
29 # implement this method so that it moves (renames) the user *src* to
30 # the user *dst*.
31 #
32 # @param src [User] the source user to be moved.
33 #
34 # @param dst [User] the destination user to which we'll move *src*.
35 #
36 def mv_user(src, dst)
37 raise NotImplementedError
38 end
39
40 end