Code from Jay Fields Refactoring Ruby Edition