]> git.cworth.org Git - sup/blobdiff - lib/sup/hook.rb
remove out-of-date comments about the hook system
[sup] / lib / sup / hook.rb
index 33a97b26063bffceb9f3d600962918b46106aa34..55241fbc647abc9cf704e81b9d2fafea174e71bb 100644 (file)
@@ -1,15 +1,6 @@
 module Redwood
 
 class HookManager
-  ## there's probably a better way to do this, but to evaluate a hook
-  ## with a bunch of pre-set "local variables" i define a function
-  ## per variable and then instance_evaluate the code.
-  ##
-  ## how does rails do it, when you pass :locals into a partial?
-  ##
-  ## i don't bother providing setters, since i'm pretty sure the
-  ## charade will fall apart pretty quickly with respect to scoping.
-  ## "fail-fast", we'll call it.
   class HookContext
     def initialize name
       @__say_id = nil
@@ -18,12 +9,6 @@ class HookManager
     end
 
     attr_writer :__locals
-
-    ## an annoying gotcha here is that if you try something
-    ## like var = var.foo(), var will magically get allocated
-    ## to Nil and method_missing will never get called.  You
-    ## can work around this by calling self.var or simply
-    ## not assigning it to itself.
     def method_missing m, *a
       case @__locals[m]
       when Proc