Articles tagged 'ruby'

I accidentially adopting the stratgey pattern for a recent project had me working on task extracting lists from a number of websites. My initial solution was to have a single class. It didn’t take long before it become verbose, with a number of branching if/else statements depending on the site being extracted. While my solution worked OK for one or two sites. I wasn’t going to be maintainable for 100’s of sites.

Accidentally applying the Strategy Pattern →