]> git.cworth.org Git - sup/blobdiff - lib/sup/hook.rb
Merge branch 'hook-local-vars' into next
[sup] / lib / sup / hook.rb
index 8a51cfebc14396d4dcd3c0f9cd1af1669479911f..3121d41b513522f0720001059be8f99fe2c53440 100644 (file)
@@ -18,7 +18,7 @@ class HookManager
     end
 
     def log s
-      Redwood::log "hook[#@__name]: #{s}"
+      info "hook[#@__name]: #{s}"
     end
 
     def ask_yes_or_no q
@@ -69,8 +69,6 @@ class HookManager
     @tags = {}
 
     Dir.mkdir dir unless File.exists? dir
-
-    self.class.i_am_the_instance self
   end
 
   attr_reader :tags
@@ -113,6 +111,8 @@ EOS
 
   def enabled? name; !hook_for(name).nil? end
 
+  def clear; @hooks.clear; end
+
 private
 
   def hook_for name
@@ -135,7 +135,7 @@ private
   end
 
   def log m
-    Redwood::log("hook: " + m)
+    info("hook: " + m)
   end
 end