Ruby Query MySQL Database

I have a sample table created in MySQL.

I have 3 functions
1. Connect to MySQL
2. Get all contacts
3. Insert contact

In my example, I am inserting 2 contacts and later retrieve the entire table of contacts.