Ruby Build an Address Book in Ruby Class Design Initializing and Calling Methods

address = Address.new address.kind = "Home" address.street_1 = "Main Street" address.street_2 = "123"

What is wrong with this

address = Address.new address.kind = "Home" address.street_1 = "Main Street" address.street_2 = "123" address.city = "New York" address.state = "NY" address.postal_code = "10101"

1 Answer

Angela Visnesky
Angela Visnesky
20,925 Points

Hi App,

The challenge is asking you to create a new instance of the Address class and assign it to the variable address, making sure to pass in the arguments. Your code should look something like this:

address = Address.new("Home", "Main Street", "123", "New York", "NY", "10101")

Hope this helps!