Miles Smith2,688 Points
Build an Address Book
Hello Treehouse Community, i must not be understanding the question what is wrong with my code? Based off the question the class AddressBook is already created so all i would need to do is set address_book = AddressBook.new in a initialize method, but i guess not.
contact = Contact.new contact.first_name = "My" contact.last_name = "Name" def initialize address_book = Addressbook.new end
Seth Reece32,861 Points
You don't need an initialize method. Just assign the address_book variable to a new AddressBook. The initialize method is part of a class to define default values.
contact = Contact.new contact.first_name = "My" contact.last_name = "Name" address_book = AddressBook.new