]> git.cworth.org Git - sup/commitdiff
Merge branch 'hook-local-vars' into next
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Tue, 1 Sep 2009 02:33:10 +0000 (22:33 -0400)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Tue, 1 Sep 2009 02:33:10 +0000 (22:33 -0400)
1  2 
lib/sup/hook.rb

diff --combined lib/sup/hook.rb
index f2be1dd298392c1f3ec1278f0fe06aee04c12991,8a51cfebc14396d4dcd3c0f9cd1af1669479911f..3121d41b513522f0720001059be8f99fe2c53440
@@@ -18,7 -18,7 +18,7 @@@ class HookManage
      end
  
      def log s
 -      Redwood::log "hook[#@__name]: #{s}"
 +      info "hook[#@__name]: #{s}"
      end
  
      def ask_yes_or_no q
@@@ -54,6 -54,7 +54,7 @@@
        end
        ret = eval __hook, __binding, __filename
        BufferManager.clear @__say_id if @__say_id
+       @__cache = {}
        ret
      end
    end
@@@ -68,6 -69,8 +69,6 @@@
      @tags = {}
  
      Dir.mkdir dir unless File.exists? dir
 -
 -    self.class.i_am_the_instance self
    end
  
    attr_reader :tags
@@@ -110,8 -113,6 +111,8 @@@ EO
  
    def enabled? name; !hook_for(name).nil? end
  
 +  def clear; @hooks.clear; end
 +
  private
  
    def hook_for name
    end
  
    def log m
 -    Redwood::log("hook: " + m)
 +    info("hook: " + m)
    end
  end