From: Charles Oliver Nutter Date: 2008-07-01T22:13:40+09:00 Subject: Re: nested methods good or bad design ara.t.howard wrote: > this is *exactly* what closures are for > > def method_1 > method_2 = @this ? lambda{ p 'yup' } : lambda{ p 'nope' } > method_3 = @this ? lambda{ p 'a' } : lambda{ p 'b' } > > method_2.call > method_3.call method_2 and method_3 are not long-lived, so if OP intention was to conditionally define methods, closures are a rather orthogonal concept. - Charlie