Created
August 31, 2011 20:39
-
-
Save ashaw/1184653 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
def ap_less_than_10(number) | |
lookup = { | |
1 => "one", | |
2 => "two", | |
3 => "three", | |
4 => "four", | |
5 => "five", | |
6 => "six", | |
7 => "seven", | |
8 => "eight", | |
9 => "nine", | |
10 => "ten" | |
} | |
number = number <= 10 ? lookup[number] : number | |
end |
kleinmatic
commented
Aug 31, 2011
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment