How to Use The Strategy Design Pattern in Ruby
Let’s talk about the strategy design pattern! This design pattern helps you change the main algorithm inside a method. You do this by passing in a class that implements this algorithm, instead of hardcoding it into the class. And when I say algorithm I don’t mean a fancy computer science algorithm, but any code that … Read more