sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit da6a682e67731a4f76095bfd36b245e7b8f11374
parent f8ddbefdf1b53cfcb521b0f4efd3cd30fb9ef162
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date:   Sun, 16 Aug 2009 23:39:15 -0700

console: clear_hooks

Diffstat:
M lib/sup/hook.rb | 2 ++
M lib/sup/modes/console-mode.rb | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/lib/sup/hook.rb b/lib/sup/hook.rb
@@ -125,6 +125,8 @@ EOS
 
   def enabled? name; !hook_for(name).nil? end
 
+  def clear; @hooks.clear; end
+
 private
 
   def hook_for name
diff --git a/lib/sup/modes/console-mode.rb b/lib/sup/modes/console-mode.rb
@@ -51,6 +51,11 @@ class Console
     end
     true
   end
+
+  def clear_hooks
+    HookManager.clear
+    nil
+  end
 end
 
 class ConsoleMode < LogMode