Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Ruby

View gist:766944
1 2 3 4 5
"ensure" makes sure code is run regardless of begin-rescue outcome. (equivalent of Java finally)
 
Pass a number parameter to Array#first and Array#last to get the first n or the last n values.
 
http://rubyquicktips.tumblr.com/post/870337608/grep-anything-from-your-enumerables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.