Created
October 1, 2013 12:02
Revisions
-
gregeng created this gist
Oct 1, 2013 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,62 @@ # A movie collection that organizes by genres # Recipes with ingredients # User profiles where each user has a list of favorite colors along with 3 personal essays, essay_1, essay_2, essay_3 ## Hashes movie_collection = { :action => ["Man on Fire", "Fight Club"] :adventure => ["National Treasure", "National Treasure 2"] :comedy => ["BASEketball", "Wedding Crashers"] :drama => ["Schindler's List", "Enemy at the Gates"] :dramedy => "Garden State" :horror => ["Exorcist", "The Sixth Sense"] } recipes = { :lasagna => ["pasta", "tomato sauce", "cheese", "ground beef"] :pizza => ["dough", "tomato sauce", "cheese"] :sushi => ["seaweed", "rice", "salmon", "cucumber", "avocado"] :tacos => ["corn tortillas", "pork", "cilantro", "onions"] } user_profiles = { :greg => [ "favorite colors" =["red","blue","green"] "personal_essays" =["essay_1", "essay_2", "essay_3"] ] :dave => [ "favorite colors" =["maroon","shale","lavendar"] "personal_essays" =["essay_1", "essay_2", "essay_3"] :kyle => [ "favorite colors" =["brown","neon green"] "personal_essays" =["essay_1", "essay_2", "essay_3"] ] } #################################### # Reverse Each Word def rev_sentence(sentence="this sentence is backwards") sentence.reverse! array = sentence.split(" ") array.reverse! puts array.join(" ") end rev_sentence ####################################