Created
April 8, 2016 17:01
-
-
Save gioiab/de6d1be1e34659feeec05109ae758975 to your computer and use it in GitHub Desktop.
Measurence Engineering Blog - Representing the range of percentage variations from very bad to very good with emojis
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 characters
def smiley(variation) | |
if variation < -15 | |
":rage:" | |
elsif variation >= -15 && variation <= -2 | |
":disappointed:" | |
elsif variation > -2 && variation < 2 | |
":neutral_face:" | |
elsif variation >= 2 && variation <= 15 | |
":slightly_smiling_face:" | |
else | |
":smile:" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment