why-classes is a linter and refactoring tool inspired by Dave Thomas's talk on the over-use of classes in Ruby. It scans a Ruby/Rails codebase (or a single file) for "class smells" -- stateless singleton-method classes, function buckets, invalid initial state, fat-base inheritance, and data buckets -- and reports each one with a concrete refactoring suggestion toward modules, composition, Struct or Data. The mechanically-safe refactorings (notably data bucket -> Struct/Data) can be applied automatically with --fix.
Required Ruby Version
>= 3.2.0
Authors
Gabriel Quaresma
Versions
-
0.2.1
-
source
- 0.2.1 source July 21, 2026 (27.5 KB)
-
-
0.1.1
-
source
- 0.1.1 source July 21, 2026 (23 KB)
-
-
0.1.0
-
source
- 0.1.0 source July 21, 2026 (23 KB)
-
Pushed by
SHA 256 checksum
Provenance
Source Commit
Build File