O'Reilly logo
  • Gustavo Lopez thinks this is interesting:

This isolation technique is perfectly reasonable for the case above but it’s especially useful when the defaults are more complicated. If your defaults are more than simple numbers or strings, implement a defaults method.


Cover of Practical Object-Oriented Design in Ruby: An Agile Primer


use of defaults method