Created
August 23, 2012 11:11
-
-
Save ys/3435654 to your computer and use it in GitHub Desktop.
How would you align these kind of things in Ruby?
This file contains hidden or 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
local_var.method_with_hash_and_block(mandatory_param, | |
option_1: a, | |
option_2: blabla, | |
option_3: blablablablablabla, | |
option_4: bblablablablablablablabla, | |
option_5: bblablablabla, | |
) do |v| | |
d = v.bla | |
e = v.bla | |
end |
This file contains hidden or 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
local_var.method_with_hash_and_block( | |
mandatory_param, | |
option_1: a, | |
option_2: blabla, | |
option_3: blablablablablabla, | |
option_4: bblablablablablablablabla, | |
option_5: bblablablabla, | |
) do |v| | |
d = v.bla | |
e = v.bla | |
end |
I'd prefer a more readable approach. Sorry it's not a one-liner anymore ^^
https://gist.github.com/3436157
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Personnaly, https://gist.github.com/3435781