Skip to content

Instantly share code, notes, and snippets.

@Bill
Forked from rtomayko/Optimizing For Patches.rb
Created January 30, 2009 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Bill/54892 to your computer and use it in GitHub Desktop.
Save Bill/54892 to your computer and use it in GitHub Desktop.
answer
# BAD:
foo.bar = 25
foo.biz = 'Hello World'
foo.bazzle = 42
# GOOD:
foo.bar = 25
foo.biz = 'Hello World'
foo.bazzle = 42
# BAD:
Foo.something :bar, :baz => 'bling',
:bizzle => 'boink',
:bowang => '...'
# GOOD:
Foo.something :bar,
:baz => 'bling',
:bizzle => 'boink',
:bowang => '...'
# What's the underlying principle at work here?
# => In multi-line statements,
# use a maximum of one tab-width of whitespace,
# at the beginning of the line only,
# to left-align lines after the first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment