Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nirname
Last active December 12, 2015 07:39
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 nirname/4738195 to your computer and use it in GitHub Desktop.
Save nirname/4738195 to your computer and use it in GitHub Desktop.
Condition with array of predicated
[true, false].reduce(&:&)
[true, false].reduce(&:|)
# the same
[true, false].any?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment