Eric Li

27%
Flag icon
Does all of this mean we should just forget about the class-based strategies? Not really. Code block-based strategies work only when the strategy interface is a simple, one-method affair. After all, the only method that we can call on a Proc object is call. If you need more than that for your strategy, by all means build some classes.
Design Patterns in Ruby (Addison-Wesley Professional Ruby Series)
Rate this book
Clear rating
Open Preview