"Ary Manzana" <a...@esperanto.org.ar> wrote in message news:jj94mb$1i7v$1...@digitalmars.com... > > Here's something I wrote today: > > parent_ids = results.map{|x| > x['_source']['parent_ids']}.flatten.uniq.compact > Hash[Site.find(parent_ids).map{|x| [x.id, x]}] >
When you format it like that (that is to say, when you *don't* format it), yea, it's unreadable. Which is why I do such things like this: parent_ids = results .map{|x| x['_source']['parent_ids']} .flatten.uniq .compactHash[ Site.find(parent_ids).map{|x| [x.id, x]} ]