Skip to content

Refactor: class method only classes #11

@MichaelXavier

Description

@MichaelXavier

This is becoming one of my favorite and most often cited articles:

http://blog.codeclimate.com/blog/2012/11/14/why-ruby-class-methods-resist-refactoring/

Classes that are made up only of class methods and no instance methods are a code smell. What does it mean to instantiate that class then? If a class has no functionality on the index and all of its functionality on the class, then the class methods should be factored into instance methods and convenience methods can get added to the class.

All the files in parsers suffer from this. util/config_reader.rb does too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions