Thinking in Objects
summary
Argues Ruby programs work best when they treat values as objects with identity, behavior and state, using encapsulation and polymorphism rather than sprawling hashes or deep inheritance. Shows ActiveRecord validation patterns, recommends composition via forwardable over long subclass chains, and demonstrates collapsing three-level nested conditionals into simple polymorphic messages by adding aliases to a Variant class. Emphasizes thinking in terms of sending messages, notes method binding via UnboundMethod#bind.call exists but is discouraged.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:47Defining Object-Oriented
- 3:24The Role of Messages
- 5:35OOP in Ruby
- 7:57Identity and Behavior
- 11:00Unique Objects and State
- 13:10Encapsulation
- 16:14Polymorphism
- 17:10Object-Based Languages
- 18:34Inheritance vs Composition
- 22:58Practical Message Sending
- 25:43Reification and Design
- 29:41Refactoring Example
- 33:04Conclusion








