Between these two extremes lies a common case, that of the method that requires a few very stable arguments and optionally permits a number of less stable ones. In this case, the most cost-effective strategy may be to use both techniques; that is, to take a few fixed-order arguments, followed by an options hash.
- Chapter 3. Managing Dependencies
- from Practical Object-Oriented Design in Ruby: An Agile Primer
- Publisher: Addison-Wesley Professional
- Released: September 2012
Similar concept to the builder pattern.
Share this highlighthttp://www.safaribooksonline.com/a/practical-object-oriented-design/3551/