Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: rlane@club.cc.cmu.edu (Rich Lane)
Subject: [sup-talk] [PATCH 5/5] console: clear_hooks
Date: Sun, 16 Aug 2009 23:39:15 -0700	[thread overview]
Message-ID: <1250491155-19281-5-git-send-email-rlane@club.cc.cmu.edu> (raw)
In-Reply-To: <1250491155-19281-4-git-send-email-rlane@club.cc.cmu.edu>

---
 lib/sup/hook.rb               |    2 ++
 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
index 33a97b2..099158d 100644
--- a/lib/sup/hook.rb
+++ b/lib/sup/hook.rb
@@ -130,6 +130,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
index c344fa6..372a466 100644
--- 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
-- 
1.6.4



  reply	other threads:[~2009-08-17  6:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-17  6:39 [sup-talk] [PATCH 1/5] console mode Rich Lane
2009-08-17  6:39 ` [sup-talk] [PATCH 2/5] console: add/remove labels Rich Lane
2009-08-17  6:39   ` [sup-talk] [PATCH 3/5] console: index internals accessor Rich Lane
2009-08-17  6:39     ` [sup-talk] [PATCH 4/5] console: reload Rich Lane
2009-08-17  6:39       ` Rich Lane [this message]
2009-08-18 18:37 ` [sup-talk] [PATCH 1/5] console mode William Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1250491155-19281-5-git-send-email-rlane@club.cc.cmu.edu \
    --to=rlane@club.cc.cmu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox