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.
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
@Gargron @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. |
@Gargron i've been saying this for years