Skip to content

Instantly share code, notes, and snippets.

@drusepth
Created September 29, 2016 01:20
Show Gist options
  • Save drusepth/cf03adeb2f0d92f3fbd24a9f173114e9 to your computer and use it in GitHub Desktop.
Save drusepth/cf03adeb2f0d92f3fbd24a9f173114e9 to your computer and use it in GitHub Desktop.
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