You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I feel that "Use empty lines between method definitions and also to break up methods into logical paragraphs internally." (for the first example) leaves some room for interpretation. IMHO its not necessary to break up a really simple method body into logical paragraphs. I consider 3 lines to be simple in most cases.
That said, since the return in the middle of a function is a opaque way of flow control, I like the idea of requiring a newline after it. So for your last example, I'd vote for
All is about to use empty line after
return
or not?First example from
https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
and second example from here
https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
After combining first and second examples this shouldnt look like that?
Should we use empty line after return?
The text was updated successfully, but these errors were encountered: