rubyist
rubyist copied to clipboard
conventions for private/public/protected
I realized these are missing, both as editor conventions (e.g., if base indent is 2, indent "private" keyword by 1 is what I use) and coding style. Off the top of my head
-
should we use
_foofor private methods ? I always thought it makes sense (way more then private does in ruby), but I seldom see it used -
should we use private/protected methods at all?
-
when should we use
privatewith or without arguments?private def foo()... end;
def foo.... end private :foo