Guest User

Untitled

a guest
Jun 17th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. FS = Org::Familysearch::Ws::Familytree::V2::Schema
  2.  
  3. child = FS::Person.new
  4. child.add_name "Jonathan /Hanson/"
  5. child.add_gender "Male"
  6. child.add_birth :date => "1850"
  7.  
  8. wife = FS::Person.new
  9. wife.add_name "Rebecca /Wilson/"
  10. wife.add_gender "Female"
  11. wife.add_birth :date => "1851"
  12.  
  13. father = FS::Person.new
  14. father.add_name "Peter /Hanson/"
  15. father.add_gender "Male"
  16. father.add_birth :date => '1820'
  17.  
  18. mother = FS::Person.new
  19. mother.add_name "Mary /Johnson/"
  20. mother.add_gender "Female"
  21. mother.add_birth :date => '1822'
  22.  
  23. ch = com.familytree_v2.save_person child
  24.  
  25. wf = com.familytree_v2.save_person wife
  26.  
  27. fa = com.familytree_v2.save_person father
  28.  
  29. mo = com.familytree_v2.save_person mother
  30.  
  31. r1 = com.familytree_v2.write_relationship ch.id, :parent => fa.id
  32.  
  33. r2 = com.familytree_v2.write_relationship ch.id, :parent => mo.id, :lineage => 'Biological'
  34.  
  35. r3 = com.familytree_v2.write_relationship fa.id, :spouse => mo.id, :event => {:type => 'Marriage', :date => '1845'}
  36.  
  37. r4 = com.familytree_v2.write_relationship ch.id, :spouse => wf.id, :event => {:type => 'Marriage', :date => '1865'}
  38.  
  39. puts "Child: #{ch.id}"
  40. puts "Wife: #{wf.id}"
  41. puts "Father: #{fa.id}"
  42. puts "Mother: #{mo.id}"
Add Comment
Please, Sign In to add comment