Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FS = Org::Familysearch::Ws::Familytree::V2::Schema
- child = FS::Person.new
- child.add_name "Jonathan /Hanson/"
- child.add_gender "Male"
- child.add_birth :date => "1850"
- wife = FS::Person.new
- wife.add_name "Rebecca /Wilson/"
- wife.add_gender "Female"
- wife.add_birth :date => "1851"
- father = FS::Person.new
- father.add_name "Peter /Hanson/"
- father.add_gender "Male"
- father.add_birth :date => '1820'
- mother = FS::Person.new
- mother.add_name "Mary /Johnson/"
- mother.add_gender "Female"
- mother.add_birth :date => '1822'
- ch = com.familytree_v2.save_person child
- wf = com.familytree_v2.save_person wife
- fa = com.familytree_v2.save_person father
- mo = com.familytree_v2.save_person mother
- r1 = com.familytree_v2.write_relationship ch.id, :parent => fa.id
- r2 = com.familytree_v2.write_relationship ch.id, :parent => mo.id, :lineage => 'Biological'
- r3 = com.familytree_v2.write_relationship fa.id, :spouse => mo.id, :event => {:type => 'Marriage', :date => '1845'}
- r4 = com.familytree_v2.write_relationship ch.id, :spouse => wf.id, :event => {:type => 'Marriage', :date => '1865'}
- puts "Child: #{ch.id}"
- puts "Wife: #{wf.id}"
- puts "Father: #{fa.id}"
- puts "Mother: #{mo.id}"
Add Comment
Please, Sign In to add comment