DEV Community

loading...

Discussion on: Ruby Science Saturday: use Mixin Modules or Reopen Classes? πŸ‘©β€πŸ”¬πŸ”¬πŸ§¬πŸ§ͺ

Collapse
schwad profile image
Nick Schwaderer Author

I think you're right. There's a benefit to using well-trodden patterns to keep code readable for others as well.

Plus in my mind I do like one file being the 'home base' for a class, and then using mixins to group and store methods used by it elsewhere.

The class-reopening-approach definitely is used a lot more in gems though (in my experience!)