The student directory Ruby script allows you to manage students that are enrolled at Villains Academy.
Shell command: ruby directory.rb
-
Once you run the code with the command above youare provided with basic user interface whichhas 5 options. By typing in relative number to the option you select the option.
-
If you select the first option it would allow you to add student and their information including name, country of birth, hobby and cohort.
-
If you select second option it allows you to view current list of students and their info.
-
Selecting option 3 saves curresnt student list to a file. User can select the file that they want to save student list to. It writes student to a file in CSV format using code block.
-
Option 4 allows you to read from a file you select. The output of the option 4 is student information saved in the file and it also gives a number of students stored in a file.
-
Final option would stop program execution.