require 'yaml'class Person attr_accessor :name, :ageendfred = Person.newfred.name = "Fred Bloggs"fred.age = 45laura = Person.newlaura.name = "Laura Smith"laura.age = 23test_data = [ fred, laura ]puts YAML::dump(test_data)