Sarah A. Morrigan14,299 Points
Can address book data be held on a separate file and called from either address.rb or contact.rb?
So here, in address.rb the data is held
home = Address.new home.kind = "Home" home.street_1 = "123 SE Main St." home.city = "Portland" home.state = "OR" home.postal_code = "97214"
while all other data (names, phone numbers) are held in contact.rb.
It seems to make a better sense to create a separate file to save all the data away from the codes. Is it even possible (without getting into all the complicated mySQL stuff)?
rowend rowend2,921 Points
Yes, you can write an array/any other structure like dict in data.rb file. Then import your file and file your objects with this structure.