matz / zetabits.com (Yukihiro Matsumoto) writes:

>      class Matz
>        @@block = proc { puts @name }
>... 
>        def block
>          self.instance_eval(&@@block)
>        end
>      end

Now, say I wanted to make it more complicated and pass parameters in
to the block. Would it be reasonable to change instance_eval so that
if block_given? was true, any parameters given to instance_eval were
passed to the block? Or am I missing (yet another) clever trick?


Dave