]> git.cworth.org Git - sup/commitdiff
remove out-of-date comments about the hook system
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Tue, 8 Sep 2009 19:47:16 +0000 (15:47 -0400)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Tue, 8 Sep 2009 19:47:16 +0000 (15:47 -0400)
lib/sup/hook.rb
lib/sup/index.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
index 9c985d98588739d2ecc5b1856cdfc5389df39f9c..20fc906d67cabce2af629d44b0b845fa2cf18629 100644 (file)
@@ -28,10 +28,7 @@ class Index
 Executes before a string search is applied to the index,
 returning a new search string.
 Variables:
-  subs: The string being searched. Be careful about shadowing:
-    this variable is actually a method, so use a temporary variable
-    or explicitly call self.subs; the substitutions in index.rb
-    don't actually work.
+  subs: The string being searched.
 EOS
 
   ## these two accessors should ONLY be used by single-threaded programs.