From 6a88cfad209417cef169d4cb52a25d7d7071a7b5 Mon Sep 17 00:00:00 2001 From: William Morgan Date: Tue, 8 Sep 2009 15:47:16 -0400 Subject: [PATCH] remove out-of-date comments about the hook system --- lib/sup/hook.rb | 15 --------------- lib/sup/index.rb | 5 +---- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/lib/sup/hook.rb b/lib/sup/hook.rb index 33a97b2..55241fb 100644 --- a/lib/sup/hook.rb +++ b/lib/sup/hook.rb @@ -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 diff --git a/lib/sup/index.rb b/lib/sup/index.rb index 9c985d9..20fc906 100644 --- a/lib/sup/index.rb +++ b/lib/sup/index.rb @@ -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. -- 2.43.0