From: Pit Capitain Date: 2005-09-06T06:38:01+09:00 Subject: Re: Change Binding of a Proc Trans schrieb: > Is there any way to change the binding of a proc? I'm defining a proc > on the class level but I want to bind it to the instance level, eg. > > class X > attr :s > dsl proc{ s+1 }, proc{ s+2 } > end > > I'm able to turn the proc into an instance method, then capture the > UnboundMethod, then undefine it, then bind it to the instance in order > to call it, but that sure seems like a hek of a round about way to have > to do things. > > Any better solutions? instance_eval ? Regards, Pit