class Integer
def tens_place_to_word(numbers)
-
(String)
- The word representation of the number.
Parameters:
-
numbers
(Hash
) -- A hash containing number words.
def tens_place_to_word(numbers) if self > 19 tens = self / 10 ones = self % 10 ten = numbers[:tens][tens - 2] ten + (ones.zero? ? '' : ' ' + ones.digit_to_word(numbers)) else teen_to_word(numbers) end end