X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Fmv%2Fmv_dummy_runner.rb;h=9ed655a4719ad30785b9a917624bc3dadfd7c768;hp=52db27be6f0082051ee17565c7ee7b8b5c61b31a;hb=df4e02ebf6a4e28a58abcb298a4442a245ad0b15;hpb=650e23790019880da91c7c7248a214a13763fd3e diff --git a/lib/mv/mv_dummy_runner.rb b/lib/mv/mv_dummy_runner.rb index 52db27b..9ed655a 100644 --- a/lib/mv/mv_dummy_runner.rb +++ b/lib/mv/mv_dummy_runner.rb @@ -1,9 +1,27 @@ require 'common/runner' +# Dummy implementation of a {MvRunner}. Its run() 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'