Class: Geez

Inherits:
NumeralBase show all
Defined in:
lib/numerify/converters/geez.rb

Overview

A class to convert to Geez script.

Constant Summary collapse

NUMERALS =
{
  0 => "",
  1 => "፩",
  2 => "፪",
  3 => "፫",
  4 => "፬",
  5 => "፭",
  6 => "፮",
  7 => "፯",
  8 => "፰",
  9 => "፱",
  10 => "፲",
  20 => "፳",
  30 => "፴",
  40 => "፵",
  50 => "፶",
  60 => "፷",
  70 => "፸",
  80 => "፹",
  90 => "፺"
}.freeze

Instance Method Summary collapse

Instance Method Details

#convert(arabic_number_string) ⇒ Object



29
30
31
32
33
34
# File 'lib/numerify/converters/geez.rb', line 29

def convert(arabic_number_string)
  arabic_number_string = arabic_number_string.to_s.strip

  arabic_number_string = "0#{arabic_number_string}" if arabic_number_string.length.odd?
  add_delimiter group_by_two arabic_number_string
end