2bb66e03aebe2145f1eaf34c246eef08e363c49f
[mailshears.git] / lib / common / runner.rb
1 # Methods inherited by the various runner classes ({PruneRunner},
2 # {MvRunner}, {RmRunner}).
3 #
4 module Runner
5
6
7 # The main thing a runner does is <tt>run()</tt>. Each runner will
8 # actually take a different number of arguments, so their
9 # <tt>run()</tt> signatures will differ. This stub is only here to
10 # let you know that it needs to be implemented.
11 #
12 # @param args [Array<Object>] whatever arguments the real implementation
13 # would take.
14 #
15 def run(*args)
16 raise NotImplementedError
17 end
18
19
20 # Report a message from the given *plugin*. All this does is prefix
21 # the message with the plugin name and then print it to stdout.
22 #
23 # @param plugin [Object] t plugin object that generated the message
24 # we're reporting.
25 #
26 # @param msg [String] the message to report.
27 #
28 def report(plugin, msg)
29 print "#{plugin.class.to_s()} - "
30 puts msg
31 end
32
33 end