Created
May 8, 2014 13:49
-
-
Save bencrouse/bc4c10fefa9d7affe3a6 to your computer and use it in GitHub Desktop.
Arguments Style
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# starting point (line is too long) | |
def send_mail(source) | |
Mailer.deliver(to: 'bob@example.com', from: 'us@example.com', subject: 'Important message', body: source.text) | |
end | |
# bad (double indent) | |
def send_mail(source) | |
Mailer.deliver( | |
to: 'bob@example.com', | |
from: 'us@example.com', | |
subject: 'Important message', | |
body: source.text) | |
end | |
# good | |
def send_mail(source) | |
Mailer.deliver(to: 'bob@example.com', | |
from: 'us@example.com', | |
subject: 'Important message', | |
body: source.text) | |
end | |
# good (normal indent) | |
def send_mail(source) | |
Mailer.deliver( | |
to: 'bob@example.com', | |
from: 'us@example.com', | |
subject: 'Important message', | |
body: source.text | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment