Most of the blogs or tutorials or books have private methods at the bottom of any class/module. Is this the best practice?
I find having private methods as and when nece
You don't need to put public
or private
above each method. I usually put all of my private methods at the bottom of my class. Also, don't have to explicitly say public
as methods are public by default. For example:
class FooBar
def some_public_method
end
def another_public_method
end
private
def some_private_method
end
def another_private method
end
end