From: "ara.t.howard" Date: 2007-08-24T02:41:34+09:00 Subject: Re: how to be cool with map On Aug 22, 2007, at 12:54 PM, Giles Bowkett wrote: > So I've got this file-checking script: > > def check > ok = true > for_every_app do |app,app_info| > ok = File.exists?(app_info[:root]) > end > ok > end this sends alarm bells ringing to me. i would expect, from that small sample of code, that i could do a_ok = apps.all?{|app| app.info.root.exist?} which is to say apps is a method or collection, an app knows it's info, an info object knows it's root, and that root is a Pathname object so therefore has an exist method. which would obviate the need for a method ;-) 2cts. a @ http://drawohara.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama