Module: Wintr

Defined in:
lib/wintr/units.rb,
lib/wintr/number.rb,
lib/wintr/version.rb,
lib/wintr/constants.rb,
lib/wintr/tens_units.rb,
lib/wintr/digit_array.rb,
lib/wintr/hundreds_tens_units.rb,
lib/wintr/weighted_digit_array.rb

Defined Under Namespace

Classes: DigitArray, HundredsTensUnits, Number, TensUnits, Units, WeightedDigitArray

Constant Summary collapse

VERSION =
'1.1.0'
UNITS =
{
  '0' => '',
  '1' => 'one',
  '2' => 'two',
  '3' => 'three',
  '4' => 'four',
  '5' => 'five',
  '6' => 'six',
  '7' => 'seven',
  '8' => 'eight',
  '9' => 'nine'
}
TENS =
{
  '2' => 'twenty',
  '3' => 'thirty',
  '4' => 'forty',
  '5' => 'fifty',
  '6' => 'sixty',
  '7' => 'seventy',
  '8' => 'eighty',
  '9' => 'ninety'
}
TEN_TO_NINETEEN =
{
  '10' => 'ten',
  '11' => 'eleven',
  '12' => 'twelve',
  '13' => 'thirteen',
  '14' => 'fourteen',
  '15' => 'fifteen',
  '16' => 'sixteen',
  '17' => 'seventeen',
  '18' => 'eighteen',
  '19' => 'nineteen'
}
POWER_OF_THOUSAND =
{
  0 => '',
  1 => 'thousand',
  2 => 'million',
  3 => 'billion',
  4 => 'trillion',
  5 => 'quadrillion',
  6 => 'quintillion',
  7 => 'sextillion',
  8 => 'septillion',
  9 => 'octillion',
  10 => 'nonillion',
  11 => 'decillion',
  12 => 'undecillion',
  13 => 'duodecillion',
  14 => 'tredecillion',
  15 => 'quattuordecillion',
  16 => 'quindecillion',
  17 => 'sexdecillion',
  18 => 'septendecillion',
  19 => 'octodecillion',
  20 => 'novemdecillion',
  21 => 'vigintillion',
  22 => 'unvigintillion',
  23 => 'duovigintillion',
  24 => 'trevigintillion',
  25 => 'quattuorvigintillion',
  26 => 'quinvigintillion',
  27 => 'sexvigintillion',
  28 => 'septenvigintillion',
  29 => 'octovigintillion',
  30 => 'novemvigintillion',
  31 => 'trigintillion',
  32 => 'untrigintillion',
  33 => 'duotrigintillion'
}