]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - bin/mailshears
Move the Runner selection into the plugin.
[mailshears.git] / bin / mailshears
index f7b1963cc8bde0a49cfc388fa29d963cf8e3db55..1398a8f06ab67d7cb5aac84d1bf2aa2d074953ce 100755 (executable)
@@ -84,22 +84,14 @@ end
 
 
 plugin_class = nil
 
 
 plugin_class = nil
-runner_class = nil
-dummy_runner_class = nil
 
 if mode == :rm then
   plugin_class = RmPlugin
 
 if mode == :rm then
   plugin_class = RmPlugin
-  runner_class = RmRunner
-  dummy_runner_class = RmDummyRunner
 elsif mode == :mv then
   plugin_class = MvPlugin
 elsif mode == :mv then
   plugin_class = MvPlugin
-  runner_class = MvRunner
-  dummy_runner_class = MvDummyRunner
 else
   # Safe, catch-all default
   plugin_class = PrunePlugin
 else
   # Safe, catch-all default
   plugin_class = PrunePlugin
-  runner_class = PruneRunner
-  dummy_runner_class = PruneDummyRunner
 end
 
 
 end
 
 
@@ -113,9 +105,9 @@ plugin_class.includers.each do |plugin_class_includer|
   plugin = plugin_class_includer.new(cfg)
 
   if cfg.i_mean_business then
   plugin = plugin_class_includer.new(cfg)
 
   if cfg.i_mean_business then
-    runner = runner_class.new()
+    runner = plugin.runner().new()
   else
   else
-    runner = dummy_runner_class.new()
+    runner = plugin.dummy_runner().new()
   end
 
   # The splat passes the correct (we hope) number of arguments to the
   end
 
   # The splat passes the correct (we hope) number of arguments to the