]>
gitweb.michael.orlitzky.com - mailshears.git/blob - lib/rm/rm_dummy_runner.rb
1 require 'common/runner'
3 # Dummy implementation of a {RmRunner}. Its <tt>run()</tt> method will
4 # tell you what would have been removed, but will not actually perform
11 # Pretend to remove *targets*. Some "what if"
12 # information will be output to stdout.
14 # This dummy runner is not particularly useful on its own. About the
15 # only thing it does is let you know that the users/domains in
16 # *targets* do in fact exist (through their descriptions). It's used
17 # to good effect by {PruneDummyRunner}, though.
19 # @param cfg [Configuration] the configuration options to pass to
20 # the *plugin* we're runnning.
22 # @param plugin [RmPlugin] plugin that will perform the move.
24 # @param targets [Array<User,Domain>] the users and domains to be
27 def run(cfg
, plugin
, *targets
)
28 targets
.each
do |target
|
29 target_description
= plugin
.describe(target
)
30 msg
= "Would remove #{target.class.to_s().downcase()} "
31 msg +
= add_description(target
, target_description
)