Top Level Namespace
Defined Under Namespace
Modules: ConnectionBase, NOTAM, NotamFormatter, Parser, SNOWTAM
Classes: NotamApi, NotamConnector, RawJson, Response, ServerApi, String
Constant Summary
collapse
- RU_ENG =
[%w[А Б Ц Д Е Ф Г Х И Й К Л М О Н П Я Р С Т У Ж В Ь Ы З],
%w[A B C D E F G H I J K L M O N P Q R S T U V W X Y Z]].reduce { _1.zip _2 }.to_h
- ENG_RU =
RU_ENG.map(&:reverse).to_h
Instance Method Summary
collapse
Instance Method Details
#otl_current_span ⇒ Object
180
|
# File 'src/notam_connector.rb', line 180
def otl_current_span = nil
|
#otl_span ⇒ Object
179
|
# File 'src/notam_connector.rb', line 179
def otl_span(...) = yield
|
#transliterate_aftn(message) ⇒ Object
12
13
14
15
16
17
|
# File 'src/transliterate.rb', line 12
def transliterate_aftn(message)
if message =~ /СЖЦ ПОЛУ4ЕН \S+\d{3} ОЖИДАЛСЯ \S+\d{3}/
message.gsub!('ПОЛУ4ЕН', 'LR').gsub!('ОЖИДАЛСЯ', 'EXP')
end
transliterate message
end
|
#transliterate_en(eng_string) ⇒ Object
10
|
# File 'src/transliterate.rb', line 10
def transliterate_en(eng_string) = eng_string.gsub /./, ENG_RU
|
#transliterate_ru(cyrillic_string) ⇒ Object
9
|
# File 'src/transliterate.rb', line 9
def transliterate_ru(cyrillic_string) = cyrillic_string.gsub /./, RU_ENG
|