Skip to content

Instantly share code, notes, and snippets.

@filipebarcos
Last active January 3, 2016 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filipebarcos/8435208 to your computer and use it in GitHub Desktop.
Save filipebarcos/8435208 to your computer and use it in GitHub Desktop.
#in real life this is going until column 98
@my_variable = MyVeryLongClassName.method("three", "arguments", "method") || default_value_method
# or
@my_variable = MyVeryLongClassName.method("three", "arguments", "method")
@my_variable ||= default_value_method
# or
@my_variable = MyVeryLongClassName.method("three", "arguments", "method")
|| default_value_method
@gmile
Copy link

gmile commented Jan 15, 2014

I'd go with 1st option.

3rd one is the one I like the least.

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