code examples from The Well-Grounded Rubyist