]> git.notmuchmail.org Git - sup/blobdiff - lib/sup/hook.rb
Merge branch 'hook-local-vars' into next
[sup] / lib / sup / hook.rb
index 0fa4169ba30ac90f56ec8bcd0090e8c62b84e40e..48a26d42207f09eaa58df802a3e585ccf14f4f33 100644 (file)
@@ -17,7 +17,7 @@ class HookManager
     end
 
     def log s
-      Redwood::log "hook[#@__name]: #{s}"
+      info "hook[#@__name]: #{s}"
     end
 
     def ask_yes_or_no q
@@ -56,8 +56,6 @@ class HookManager
     @tags = {}
 
     Dir.mkdir dir unless File.exists? dir
-
-    self.class.i_am_the_instance self
   end
 
   attr_reader :tags
@@ -100,6 +98,8 @@ EOS
 
   def enabled? name; !hook_for(name).nil? end
 
+  def clear; @hooks.clear; end
+
 private
 
   def hook_for name
@@ -122,7 +122,7 @@ private
   end
 
   def log m
-    Redwood::log("hook: " + m)
+    info("hook: " + m)
   end
 end