X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Fcommon%2Frunner.rb;h=2bb66e03aebe2145f1eaf34c246eef08e363c49f;hp=32f2b3ecf8bb0354408fb7fbe46596155e2baf3a;hb=b947ef8844f090eedd50be0383abe417d910bb1a;hpb=483d14dc8228a81d12fb109d3ed6510e2d2b03c1 diff --git a/lib/common/runner.rb b/lib/common/runner.rb index 32f2b3e..2bb66e0 100644 --- a/lib/common/runner.rb +++ b/lib/common/runner.rb @@ -1,9 +1,30 @@ +# Methods inherited by the various runner classes ({PruneRunner}, +# {MvRunner}, {RmRunner}). +# module Runner - def run(plugin, targets) + + # The main thing a runner does is run(). Each runner will + # actually take a different number of arguments, so their + # run() signatures will differ. This stub is only here to + # let you know that it needs to be implemented. + # + # @param args [Array] whatever arguments the real implementation + # would take. + # + def run(*args) raise NotImplementedError end + + # Report a message from the given *plugin*. All this does is prefix + # the message with the plugin name and then print it to stdout. + # + # @param plugin [Object] t plugin object that generated the message + # we're reporting. + # + # @param msg [String] the message to report. + # def report(plugin, msg) print "#{plugin.class.to_s()} - " puts msg