From 9bce58ef5e33eebaa48186bfd2a92b6bb426d1e2 Mon Sep 17 00:00:00 2001 From: Artem Darius Weber Date: Sat, 14 Sep 2024 11:33:00 +0300 Subject: [PATCH] feat: added user interface using console args and swich langs with unique response --- 02_user_interface.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 02_user_interface.rb diff --git a/02_user_interface.rb b/02_user_interface.rb new file mode 100644 index 0000000..1d99b3d --- /dev/null +++ b/02_user_interface.rb @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +LANGUAGES = [ + "ru-RU", + "en-EN", + "de-DE" +] + + +def main() + user_name = ARGV[0] + puts "Hello my catgirl #{user_name}! \n What is your love language?" + LANGUAGES.each { |language| puts "#{language}", " " } + user_lang = gets.chomp + user_lang = "ruby" + case user_lang + when "ruby" + puts "Подлиза \n" + when "c++" + puts "MATLAB скушал? \n" + when "TS/JS" + puts "Фронтендер, Фууу! \n" + when "py" + puts "Девопсер, иди ДАГИ писать \n" + end +end + + +main() +