Exemplo simples de CRUD de uma Agenda em Ruby
This example presents a simple address book CRUD (Create, Read, Update, Delete) interface built in Ruby. The script uses a core Ruby `Hash` to store contact names and their associated phone numbers, with a `while true` loop and a `case` statement providing a text-based menu. User input is handled with `gets.chomp`, and `to_sym` converts names into hash keys. The code demonstrates adding, updating, displaying, and deleting entries, printing each action’s confirmation or error message directly to the console. The data is entirely held in memory, and no external libraries or file persistence are used.