]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/prune/prune_runner.rb
Document everything with YARD and fix some bugs along the way.
[mailshears.git] / lib / prune / prune_runner.rb
index fbad8e8f11c4e5cb71f7dcc2ccbdc0caf7ad40b5..a9e2282857fc3be027a14d0410ae75436c25f934 100644 (file)
@@ -2,9 +2,18 @@ require 'common/runner'
 require 'prune/plugins/postfixadmin'
 require 'rm/rm_runner'
 
+# Perform the pruning of users/domains using {PrunePlugin}s.
+#
 class PruneRunner
   include Runner
 
+  # Run *plugin* to prune leftover users and directories.
+  #
+  # @param cfg [Configuration] configuration options passed to
+  # {PostfixadminPrune}.
+  #
+  # @param plugin [Class] plugin class that will perform the pruning.
+  #
   def run(cfg, plugin)
     # We don't want to check the PostfixAdmin database against itself.
     return if plugin.class == PostfixadminPrune
@@ -17,6 +26,7 @@ class PruneRunner
     leftovers  = plugin.get_leftover_users(db_users)
     leftovers += plugin.get_leftover_domains(db_domains)
 
+    # We're counting on our PrunePlugin also being an RmPlugin here.
     rm_runner = RmRunner.new()
     rm_runner.run(cfg, plugin, *leftovers)
   end