Skip to content

Instantly share code, notes, and snippets.

@joefiorini
Created June 27, 2011 15:23
Show Gist options
  • Save joefiorini/1049083 to your computer and use it in GitHub Desktop.
Save joefiorini/1049083 to your computer and use it in GitHub Desktop.
Indent methods under private?
class Blah
private
def method1
end
def method2
end
end
# vs.
class Blah
private
def method1
end
def method2
end
end
# vs.
class Blah
def public_method
end
private
def method1
end
def method2
end
end
@jedeleh
Copy link

jedeleh commented Jul 31, 2017

I've always used 1 but at my current job they use 2 so I've switched to that for the sake of consistency. I don't feel strongly but prefer 1.

However, I really dislike 3 as it visually interrupts the scope of the class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment