Quantcast
Channel: Dave Copeland :ruby:
Viewing all articles
Browse latest Browse all 489

Article 3

$
0
0

Here is how I would implement `Account` (again, without context - some of the stuff in there might not belong there, but I'm assuming it does)

gist.github.com/davetron5000/e

I've come to despite `return some < expression` and find it much easier to see each possible case itemized in a `case` or `if/elsif/else` block, especially since they are both expressions in Ruby.

I also have come to despite yoda statements as everything feels backwards and hard to unwind.


Viewing all articles
Browse latest Browse all 489