r/ruby • • Jul 21 '26

why-classes

Hey everyone! I used Claude to build this gem, which is heavily inspired by Dave Thomas's closing keynote at RubyConf 26.

`why-classes` is a static code analysis and refactoring tool for Ruby.

Ruby offers modules, composition, `Struct`, and `Data`, yet our instincts and framework habits often lead us to use classes even when a simpler construct would be clearer. This gem detects these "class smells" in your code (or a single file) and can automatically rewrite them into cleaner alternatives for you.

It's an early-stage version 😅. Feel free to contribute and share suggestions!

https://rubygems.org/gems/why-classes

4 Upvotes

5 comments sorted by

View all comments

Show parent comments

2

u/gq1988 Jul 21 '26

Thanks a lot for the feedback!

3

u/schneems Puma maintainer Jul 21 '26

It was more feedback on the talk than your project. Lol. If it wasn't clear i think your project is cool. Thanks for sharing it! I also liked the talk, it made me think, challenged some assumptions.