3.13 Replace Method with Method Object
It’s not always easy to keep things simple in our domain logic. Sometimes you’ll end up with a complicated algorithm with complex operations and entangled variables that depend too much on each other. You have no idea how to break that entangled mess of code. How do you turn it around?
If you face a scenario where you have a method with lots of arguments and local variables, there’s a chance you might bend that code to your will — you replace that method with an entire class! Watch this lesson to see how.