public
Last active

Ruby

  • Download Gist
gistfile1.txt
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.