I’m looking for a Ruby’s equivalent of Code Like a Pythonista: Idiomatic Python
Desirable features:
- easy to read
- single document which covers all topics: tips, tricks, guidelines, caveats, and pitfalls
- size less than a book
- idioms should work out of the box for the standard distribution (
% sudo apt-get install ruby irb rdoc)
Please, put one tutorial per answer if possible, with an example code from the tutorial and its meaning.
UPDATE:
These are the most closest to the above description resources I’ve encountered:
Ruby Idioms (originally from RubyGarden) is my usual reference for idioms. It’s clearly organized and fairly complete. As the author says, these are from RubyGarden, which used to be really cool (thanks Wayback Machine). But now seems to be offline.