Guest User

Untitled

a guest
Jun 17th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. # P.L.V. oct 09 10
  2. # Put the lib directory on the load path
  3. $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
  4. require 'ruby-fs-stack'
  5. require 'pp'
  6.  
  7. FamTreeV2 = Org::Familysearch::Ws::Familytree::V2::Schema
  8. ft = FamTreeV2::FamilyTree.new
  9. #
  10. @person = FamTreeV2::Person.new
  11. @person.id = 'regain01'
  12. @person.add_name 'Pierre Lucien Eugène VAUDREY'
  13. @person.add_gender 'Male'
  14. @person.add_birth :date => '09 Jul 1940', :place => 'Beveuge, Haute-Saône'
  15. #
  16. @person3 = FamTreeV2::Person.new
  17. @person3.id = 'regain03'
  18. @person3.add_name 'Pierre Auguste VAUDREY'
  19. @person3.add_gender 'Male'
  20. @person3.add_birth :date => '15 Aug 1908', :place => 'Beveuge, Haute-Saône'
  21. @person3.add_death :date => '03 may 1978', :place => 'Beveuge, Haute-Saône'
  22. #
  23.  
  24. @person3.create_relationship :type => 'child', :with => 'regain01'
  25. #
  26. @person4 = FamTreeV2::Person.new
  27. @person4.id = 'regain04'
  28. @person4.add_name 'Louise Elise GROSMOUGIN'
  29. @person4.add_gender 'Female'
  30. @person4.add_birth :date => '16 Sep 1910', :place => 'Beveuge, Haute-Saône'
  31. @person4.add_death :date => '03 Feb 2005', :place => 'Villersexel, Haute-Saône'
  32. #
  33.  
  34. @person1 = FamTreeV2::Person.new
  35. @person1.id = 'regain02'
  36. @person1.add_name 'Simone Marie BRUN'
  37. @person1.add_gender 'Female'
  38. @person1.add_birth :date => '27 Sep 1937', :place => 'Bourg-Saint-Christophe, Ain'
  39.  
  40. @person1.create_relationship :type => 'spouse', :with => 'regain01', :event => {:type => 'Marriage',:place =>"Bourg-Saint-Christophe, Ain", :date => '31 Aug 1963'}
  41. #
  42. @person.create_relationship :type => 'spouse', :with => 'regain02', :event => {:type => 'Marriage',:place =>"Bourg-Saint-Christophe, Ain", :date => '31 Aug 1963'}
  43.  
  44. @person.create_relationship :type => 'parent', :with => 'regain03'
  45. @person.create_relationship :type => 'parent', :with => 'regain04'
  46. pp JSON.parse(@person.to_json)
Add Comment
Please, Sign In to add comment