The following is easy stuff but we tend to forget about it… probably because most of us are not used to this kind of behavior from a programming language.
It’s not a secret, Ruby syntax offers many possibilities. One thing I enjoy doing once in a while is to take some code I have written a few days before and improve it to make it look more rubyish (read : short, expressive and readable). I thought it could be fun to make a little [...]
Enumerations are an elegant way to make your code more readable. Unfortunately, Ruby doesn’t have a built-in enum type. (Don’t stop reading now! This story ends with hapiness and joy)