O'Reilly logo

Design Patterns in Ruby by Russ Olsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 19. Conclusion

We have come a long way in this book—from our modest beginnings in overriding methods in the Template Method pattern, all the way to dynamically loading classes by convention. During our journey we have seen that the duck-typed, dynamic nature of Ruby changes the way we solve many programming problems. If we need to vary an algorithm that is buried deep in the depths of some class, we might build a Strategy object, but then again we might just pass in a code block. Implementing patterns like Proxy and Decorator—the ones that rely most heavily on delegation—ceases being an exercise in cranking out boilerplate code. The dynamic and reflective features of Ruby let us embrace the idea of a factory while going beyond the inheritance-bound ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required