An Exercise in Refactoring in Ruby - Part 2
Using Extract Method Object to refactor large methods
I have previously been over the extraction pattern, Extract Method. Today we will explore it’s big brother, Extract Method Object.
The Extract Method Object pattern is used to take a method or groups of methods from coupled, untestable code into code that adheres to the Single Responsibility Principle, or an object/ method/construct should have 1 and only 1 reason to change.
Post a comment