Last active
December 2, 2017 23:21
-
-
Save aeschright/9ec5c7574e53f36cbd3221894e24b3a1 to your computer and use it in GitHub Desktop.
Revisions
-
aeschright revised this gist
Dec 2, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 @@ -25,7 +25,7 @@ end end File.open('moods.txt', 'a') do |file| file.puts "#{Time.now} #{emoji}" end puts "I recorded your answer." -
aeschright revised this gist
Dec 2, 2017 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 @@ -8,9 +8,9 @@ mood_description = gets.chomp while mood_satisfied == false do if ["happy", "delighted", "gratified", "glad", "joyful", "joyous", "pleased", "satisfied", "thankful", "tickled"].include? mood_description emoji = happy_emojis.sample elsif ["sad", "bad", "blue", "brokenhearted", "cast down", "crestfallen", "dejected", "depressed", "despondent", "disconsolate", "doleful", "down", "downcast", "downhearted", "droopy", "forlorn", "gloomy", "glum", "hangdog", "heartbroken", "heartsick", "heartsore", "heavyhearted", "inconsolable", "joyless", "low", "low-spirited", "melancholic", "melancholy", "miserable", "mournful", "saddened", "sorrowful", "sorry", "unhappy", "woebegone", "woeful", "wretched"].include? mood_description emoji = sad_emojis.sample end @@ -25,4 +25,7 @@ end end File.open('moods.txt', 'w') do |file| file.puts "#{Time.now} #{emoji}" end puts "I recorded your answer." -
aeschright revised this gist
Dec 2, 2017 . 1 changed file with 28 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 @@ -1 +1,28 @@ #!/usr/bin/env ruby happy_emojis = ["π", "π", "πΊ", "πΈ"] sad_emojis = ["π", "π", "π", "βΉοΈ", "πΏ"] mood_satisfied = false puts "How are you feeling?" mood_description = gets.chomp while mood_satisfied == false do if mood_description == "happy" emoji = happy_emojis.sample elsif mood_description == "sad" emoji = sad_emojis.sample end puts "Does #{emoji} match your mood?" confirmation = gets.chomp confirmation = confirmation.downcase if ["y", "yes", "yep", "sure"].include? confirmation mood_satisfied = true else puts "Please give me another word to describe your mood" mood_description = gets.chomp end end puts "I recorded your answer." -
aeschright created this gist
Dec 2, 2017 .There are no files selected for viewing
This file contains hidden or 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 @@ #!/usr/local/env ruby