From: Jim Freeze Date: 2002-07-31T01:31:43+09:00 Subject: Re: Procs and scope (function pointers) On Tue, Jul 30, 2002 at 10:30:29PM +0900, Dave Thomas wrote: > Jim Freeze writes: > > > > def compute(x) > > @func.call(x) > > end > > end > ... > > Is there a way to access instance methods/variables and still > > keep the function definitions at the class level? > > You could try > > def compute(x) > instance_eval(&func) instance_eval(&func(x)) # would I pass the argument like this? > end > > -- Jim Freeze If only I had something clever to say for my comment... ~