]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/common/runner.rb
Document everything with YARD and fix some bugs along the way.
[mailshears.git] / lib / common / runner.rb
index 01fcc176e3cedd62935a9b81c5b3657437abd610..2bb66e03aebe2145f1eaf34c246eef08e363c49f 100644 (file)
@@ -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 <tt>run()</tt>. Each runner will
+  # actually take a different number of arguments, so their
+  # <tt>run()</tt> signatures will differ. This stub is only here to
+  # let you know that it needs to be implemented.
+  #
+  # @param args [Array<Object>] 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