In JavaScript, it's easy to hide function or variable in closure.
In ruby, private doesn't work for Module method.
Is there best practice to do so?
module Lib
def self.public_function
private_function
end
private # Does not work
def self.private_function
end
end
Lib.public_function
I've read this post: Private module methods in Ruby
But the best answer is not simple enough for me.