Class: Runglish::LatToRusConverter

Inherits:
Converter
  • Object
show all
Defined in:
lib/runglish.rb

Instance Method Summary collapse

Methods inherited from Converter

#transliterate

Constructor Details

#initializeLatToRusConverter

Returns a new instance of LatToRusConverter.



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/runglish.rb', line 78

def initialize
  lower_single = {
    "i"=>"і", "g"=>"ґ", "#"=>"", "e"=>"є",
    "a"=>"а", "b"=>"б",  "v"=>"в", "g"=>"г", "d"=>"д", "e"=>"е", "z"=>"з", "i"=>"и",
    "k"=>"к", "l"=>"л", "m"=>"м", "n"=>"н", "o"=>"о", "p"=>"п", "r"=>"р", "s"=>"с", "t"=>"т",
    "u"=>"у", "f"=>"ф", "h"=>"х", "y"=>"ъ", "y"=>"ы",
    "c"=>"к", "w"=> "в"
  }

  lower_multi = {
    "yo"=>"ё",
    "yi"=>"ї",
    "ii"=>"й",
    "zh"=>"ж",
    "ts"=>"ц",
    "ch"=>"ч",
    "sh"=>"ш",
    "sch"=>"щ",
    "ye"=>"э",
    "yu"=>"ю",
    "ya"=>"я",
    "ie"=>"ье"
  }

  upper_single = {
    "G"=>"Ґ", "Є"=>"E", "I"=>"І",
    "A"=>"А", "B"=>"Б", "V"=>"В", "G"=>"Г", "D"=>"Д", "E"=>"Е", "Z"=>"З", "I"=>"И",
    "K"=>"К", "L"=>"Л", "M"=>"М", "N"=>"Н", "O"=>"О", "P"=>"П", "R"=>"Р",
    "S"=>"С", "T"=>"Т", "U"=>"У", "F"=>"Ф", "H"=>"Х", "'"=>"Ъ", "Y"=>"Ы",
    "C"=>"К", "W"=> "В"
  }

  upper_multi = {
    "YO"=>"Ё",
    "YI"=>"Ї",
    "II"=>"Й",
    "ZH"=>"Ж",
    "TS"=>"Ц",
    "CH"=>"Ч",
    "SH"=>"Ш",
    "SCH"=>"Щ",
    "YE"=>"Э",
    "YU"=>"Ю",
    "YA"=>"Я",
    "IE"=>"ЬЕ"
  }

  super(lower_single, lower_multi, upper_single, upper_multi)
end