Skip to content

Instantly share code, notes, and snippets.

@tamouse
Created March 21, 2014 20:28
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 tamouse/9695667 to your computer and use it in GitHub Desktop.
Save tamouse/9695667 to your computer and use it in GitHub Desktop.
Methods a, b, and c return truthy or falsy. Which of these is better approach?
method_a(data) && method_b(data) && method_c(data)
# or
if method_a(data)
if method_b(data)
method_c(data
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment