X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Fcommon%2Frunner.rb;h=2bb66e03aebe2145f1eaf34c246eef08e363c49f;hp=01fcc176e3cedd62935a9b81c5b3657437abd610;hb=df4e02ebf6a4e28a58abcb298a4442a245ad0b15;hpb=d0bfa37fb4be739b31dd97c493764ca19a160182 diff --git a/lib/common/runner.rb b/lib/common/runner.rb index 01fcc17..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(cfg, 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