Funny, I love Ruby and it's my primary language of choice, but I'm a heretic, using braces whenever I can:
# events per day
ndbh.fetch('select ts from tbl').all.map { |row|
row[:ts]
}.map { |t|
t.strftime('%Y-%m-%d')
}.each { |day|
days[day] += 1
}
(yes this could be conciser)This is generally frowned on, and I'm sure everyone who likes having this style
foo
.map {}
.select {}
.blah {}
will frown as well, but it's so much more visually appealing to me, coming from a C/perl background when I first encountered Ruby (many years ago).Funny how important syntax is. So easy to look at code in another style/language and go THATS NOT RIGHT!!