Long Method
Methods which are too long
Symptoms
• If you can’t tell exactly what a method does at a glance, it’s too long. • Methods with more than one level of nesting are usually too long. • Methods with more than one level of abstraction may be too long. • Methods with a flog score of 10 or higher may be too long.
Checking
- Use flog gem. Eg:
flog app lib
Solutions
- Extract Method⭐ - Break apart long methods