Skip to content

Instantly share code, notes, and snippets.

@dminuoso

dminuoso/f.rb Secret

Created March 21, 2018 09:59
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 dminuoso/d86250e94e4733e2b467bf415fecbab0 to your computer and use it in GitHub Desktop.
Save dminuoso/d86250e94e4733e2b467bf415fecbab0 to your computer and use it in GitHub Desktop.
arr = [1,2,3]
q = case
when arr.include?(1) then "a"
when arr.length > 1 then "b"
else "c"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment