RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

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.

Read now!

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in