Skip to content

Instantly share code, notes, and snippets.

@jessabean
Created January 16, 2013 21:17
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 jessabean/4551056 to your computer and use it in GitHub Desktop.
Save jessabean/4551056 to your computer and use it in GitHub Desktop.
santa_list = ["Andrea", "Gloria", "Jessica", "Angela", "Mike N.", "Mike B.", "Chris", "Mom", "Dad"]
while !santa_list.empty? do
santa = santa_list.shift
giftee_list = santa_list.shuffle
giftee = giftee_list.shift
assignment = {:santa => santa, :giftee => giftee}
puts assignment
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment