views:

1779

answers:

3

Is there a document for Ruby that describes some preferred conventions for whitespace, indentation and other style issues?

I found Python's PEP 8 to be very helpful and am looking for something similar for Ruby.

+8  A: 

There's nothing official, but the two common guidelines are:

Of the two, I find the second one more informative.

Pesto
+4  A: 

http://github.com/chneukirchen/styleguide/ is awesome.

Yaroslav
Nice compilation!
Swanand
Loved this, forked it for a company style guide, but using detect/select over find/find_all for less confusion with Rails find method.
Alan Peabody
+1  A: 

I wrote some thoughts a while back at http://www.pathf.com/blogs/ruby-and-rails-style-guide/

Noel Rappin