]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/mv/mv_dummy_runner.rb
Document everything with YARD and fix some bugs along the way.
[mailshears.git] / lib / mv / mv_dummy_runner.rb
index 52db27be6f0082051ee17565c7ee7b8b5c61b31a..9ed655a4719ad30785b9a917624bc3dadfd7c768 100644 (file)
@@ -1,9 +1,27 @@
 require 'common/runner'
 
+# Dummy implementation of a {MvRunner}. Its <tt>run()</tt> method will
+# tell you what would have been moved, but will not actually perform
+# the operation.
+#
 class MvDummyRunner
   include Runner
 
-  def run(plugin, src, dst)
+  # Pretend to move *src* to *dst* with *plugin*. Some "what if"
+  # information will be output to stdout. This is useful to see if
+  # there would be (for example) a username collision at *dst* before
+  # attempting the move in earnest.
+  #
+  # @param cfg [Configuration] the configuration options to pass to
+  #   the *plugin* we're runnning.
+  #
+  # @param plugin [Class] plugin class that will perform the move.
+  #
+  # @param src [User] the source user to be moved.
+  #
+  # @param dst [User] the destination user, to which we will move *src*.
+  #
+  def run(cfg, plugin, src, dst)
 
     if src.is_a?(Domain) or dst.is_a?(Domain) then
       msg = 'only users can be moved'