From: Nikolai Weibull Date: 2005-05-19T01:56:35+09:00 Subject: Re: Help regarding def wrapper Carlos wrote: > [Nikolai Weibull ���] > > I���d like to have a def that I can scope in one go, i.e., > > > > class A > > scoped_def :private, :a do > > ��� > > end > > end > > > How about something like this? It's closer to the current usage: > > class Class > def method_added m > if @decorator > send(@decorator, m) > end > @decorator = nil > end > > def priv > @decorator = :private > end > end > > class C > priv; def a() puts "private" end > def b() puts "public" end > end > > c = C.new > c.b > c.a Hehe, that���s kind of sweet actually. Thanks, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}