Eastward Ho! A Clear Path Through Ruby With OO Jim Gay
summary
Claims a concrete refactor: apply East-oriented Code to push behavior from Person into Address and a Template, reducing westward queries and fixing a formatting bug. Demonstrates rules—always return self, objects query themselves, factories exempt—shows before/after code, and builds a tiny gem that forwards commands (returns the receiver) so chained calls work. Tests insert a sandwich row to prove behavior; implementation is small, on GitHub, and the approach removes Demeter violations while keeping templates and privacy logic intact.
AI-written summary · about
chapters (6)
- 0:00Start
- 1:55QUERIES COMMANDS
- 7:50Command, Don't Query
- 23:21POLYMORPHISM
- 23:37LOOSEN COUPLING
- 32:09CHANGE YOUR CODE








