Skip to content

Instantly share code, notes, and snippets.

@gbpereira
Last active January 10, 2018 01:48
Show Gist options
  • Save gbpereira/79d7e88c57976ae534bc to your computer and use it in GitHub Desktop.
Save gbpereira/79d7e88c57976ae534bc to your computer and use it in GitHub Desktop.
# unless ao invés de `if !condition`
do_something unless condition
unless condition
do_something
end
# until ao invés de `while !condition`
until condition
do_sometring
end
# operador ternário
(a == 1) ? puts('a = 1') : puts('a != 1')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment