Open dzhlobo opened 11 years ago
@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
@FoboCasteR :+1:
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.