Sticky Ruby
summary
Shows concrete Ruby patterns for composing code: a TCP connection object gets behavior via modules (a retry module added to customer breaks semantics), expensive state lives in a singleton connection pool passed in and wrapped by a delegator so method_missing forwards to the pool instead of inheriting state, lambdas enforce arity while procs can return out of the caller, prefer refine over global monkey‑patching, and use pool.open { … } yield/destroy lifecycle to avoid GC leaks.
AI-written summary · about
chapters (8)
- 0:00Start
- 5:49Modules
- 9:03Connection Pool
- 10:19The Delegator
- 12:08Inversion of Control
- 13:28Composition
- 14:12Crash Course Lambdas
- 18:24Closing Thoughts








