Ruby Build an Address Book in Ruby Class Design Instance variable instantiation

What I'm doing wrong?

In the initialize method of the address book class, define an instance variable called contacts which is set to an empty array.

address_book.rb
class AddressBook

   def initialize(contacts)
     @contacts = []
   end

end

Where is the mistake, please?

2 Answers

Anish Walawalkar
Anish Walawalkar
8,532 Points

That should fix it:

class AddressBook

   def initialize()
     @contacts = []
   end

end

Thanks!