From: Aaron Haas Date: 2010-11-14T21:17:37+09:00 Subject: more help with address book I’m trying to create a simple address book in ruby. It is made up from the following classes. Address, Phone, Person, and AddressBook . The Address, Phone, Person classes all work fine. I’m having problems with several methods in my AddressBook class. Add(person) needs to check if that person already exists. I tried using my query method but it only prints the name to the screen. Can I make it also return an person object to use as a comparison? The prompt method should take a command (add, print, remove, find, exit) then depending on which command ask the user for required information. The command prompts should run continuously until “exit” is entered. The add command which is the most complicated of the five works fine for a single time. I can’t figure out how to implement a while condition to keep it going without getting errors. I’m also having problems with the remove method logic. I built the remove method to take a variable name as a parameter, but the command prompt would require an first and last name instance fields from the person class. I'm getting close just a few tweaks here and there. This code is getting long one so I just attached the file. If you think I should copy and paste let me know. Attachments: http://www.ruby-forum.com/attachment/5368/Ruby_AB.rb -- Posted via http://www.ruby-forum.com/.