]> git.cworth.org Git - sup/commitdiff
console: clear_hooks
authorRich Lane <rlane@club.cc.cmu.edu>
Mon, 17 Aug 2009 06:39:15 +0000 (23:39 -0700)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Tue, 18 Aug 2009 18:00:20 +0000 (14:00 -0400)
lib/sup/hook.rb
lib/sup/modes/console-mode.rb

index 0a0a2f672fca775e4bb792896537d2ec2535fac3..f40ba1b42b438b5279798407fc1bee93a7df85f9 100644 (file)
@@ -125,6 +125,8 @@ EOS
 
   def enabled? name; !hook_for(name).nil? end
 
+  def clear; @hooks.clear; end
+
 private
 
   def hook_for name
index c344fa6c96de3769f914fd16f79528cfbf0f629a..372a4665a554663fbab105d17cb2223dd9b891a2 100644 (file)
@@ -51,6 +51,11 @@ class Console
     end
     true
   end
+
+  def clear_hooks
+    HookManager.clear
+    nil
+  end
 end
 
 class ConsoleMode < LogMode