Code smells related to classes' definition.
Class-level code smells indicate poorly defined classes (including too large classes or God object, data clump feature envy etc...) in your source code.
class Warehouse def sale_price(item) item.price - item.rebate end end # sale_price refers to item more than self.
These classes should be refactored for better readability and maintainability of your source code.
How to fix this
When a class is wearing too many (functional) hats (too large classes), you should probably think about splitting it up:
- Extract class
- Extract subclass
- Extract interface