From: Florian Gross Date: 2005-03-24T11:09:52+09:00 Subject: Re: Credit Card Verification as an exercise Jeffrey Moss wrote: > They were good suggestions, I haven't quite adjusted to ruby, still in a > perl mindset. That's what I meant. I'm trying to free my mind. The perl > code was pretty long, maybe over 100 lines, in ruby its like 20, heh heh. Heh, that's one reason we love it so much. :) > I leave the "then" off too, I only use then if its a one liner, and in > that case I will usually use { }'s > if there is a CR right after the if line, then its self explanatory I > think (and emacs indents the line after so its all good) > minor details I guess my habit comes from writing such code: if items.all? do |item| item > 5 and more complex checks and so on or whatever end then do something end That was the reason for me generally adapting the 'then' suffixes, I think.