Skip to content

Instantly share code, notes, and snippets.

@stepahn
Created April 13, 2010 10:01
Show Gist options
  • Save stepahn/364473 to your computer and use it in GitHub Desktop.
Save stepahn/364473 to your computer and use it in GitHub Desktop.
wheel 'o food
class Array; def rand; self[Kernel.rand self.length]; end; end
Array.new(rand(100)*2+1){[:pizza, :chinese, :greek].rand}.inject(Hash.new{0}){|h, i| h[i]+=1;h }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment