2

Получить расширение файла

ext = File.extname(file_name)
-----------