Reputation: 32206
Is it possible to include modules in other modules in Ruby?
Upvotes: 0
Views: 98
Reputation: 160321
Yes.
That said, the whole double-inclusion thing can be bad. There's a gem for that.
Upvotes: 3
Reputation: 2724
Sure, but...
Before you do that, ask yourself what distinction caused you to split the code across two modules, and then ask why that distinction wouldn't be meaningful to your consumers.
Upvotes: 3