Builder design pattern in Ruby

Builder pattern in Ruby
  • it doesn’t look professional ;)
  • we have very long list of params which limits us with the ways we can instantiate a new user. To do this, you can sent nil for certain params but it can look very messy soon,
  • adding new params will only make the situation worse,
  • logic how the object is build is hidden in its instantiation.

--

--

Dev and life blog. Thoughts about programming, design patterns, Ruby and life.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store