From: Kalman Noel Date: 2007-02-14T22:45:11+09:00 Subject: Re: Proc objects and Maintainability - a design note to self John Carter: > proc_obj = Proc.new{|a,b,c| doStuffWith(a,b,c,andD,andE,andFfromMyLexicalScope)} > > I'm refactoring that to.... > > class SensibleNameProcObject > def initialize( d, e, f) > @d, @e, @f = d, e, f > end > > def to_s > "#{self.class}:The dowhop is #{@d} for egg #{@e} on fries #{@f}" > end > > def call( a, b, c) > doStuffWith(a,b,c,@d, @e, @f) > end > end This makes me think that a Ruby programmer should maybe use the word 損call束 in several cases where you would use 損run束 or 損start束 or 損process束 in other languages. Provided that 損call束 makes some sense in a specific case, it will line up beautifully with the core library. 損alias [] call束 may come in handy, too. Kalman