Email or username:

Password:

Forgot your password?
Eugen Rochko

One thing I wish #Ruby had was private methods in modules, so that I wouldn't have to worry about polluting the classes that include those modules with various module-internal helper methods.

3 comments
Andreas Plassmann

@Gargron
ich finde es sehr, traurig das man hier auf eine Frage keine Antwort bekommt wie viele andere. Das stelle ich leider hier sehr stark fest.

berkes 🐝 🚐 🏄 🌱

@Gargron there are some tricks though. Like evalling on "Module#included" . Solution worse than the problem, though.

My take is that if you want private methods on modules, modules are probably not the right solution. You probably need a refactored inheritance chain instead.

Go Up