Created
September 29, 2016 01:20
-
-
Save drusepth/cf03adeb2f0d92f3fbd24a9f173114e9 to your computer and use it in GitHub Desktop.
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 characters
class EmojiService | |
def self.emoji_for_sentiment sentiment_score | |
case sentiment_score | |
when -5..-2.5 | |
":'(" | |
when -2.5..-1 | |
":(" | |
when -1..1 | |
":|" | |
when 1..2.5 | |
":)" | |
when 2.5..5 | |
":D" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment