-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Private methods indentation #10
Comments
@gotva, @FoboCasteR, @jaturken what do you think about this? I personally prefer second variant but have no arguments. |
I prefer class Foo
class << self
def method_of_class
end
end
def instance_method
end
private # or protected
def private_method
end
end I prefer to have more than 2 spaces in any not public-instance methods. When you open a model with 100+ lines you go to the end of file and start writing code it can be wrong place for your code (it can be private/protected section). If you have convention described above you will see 4 spaces before definition and it is a sign that it is not correct place for your code |
We should discuss code convention about indentation private methods in classes. We have two common conventions.
First one:
Second one:
Also I propose to add one blank line before
private
word and one after.The text was updated successfully, but these errors were encountered: