Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # P.L.V. oct 09 10
- # Put the lib directory on the load path
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
- require 'ruby-fs-stack'
- require 'pp'
- FamTreeV2 = Org::Familysearch::Ws::Familytree::V2::Schema
- ft = FamTreeV2::FamilyTree.new
- #
- @person = FamTreeV2::Person.new
- @person.id = 'regain01'
- @person.add_name 'Pierre Lucien Eugène VAUDREY'
- @person.add_gender 'Male'
- @person.add_birth :date => '09 Jul 1940', :place => 'Beveuge, Haute-Saône'
- #
- @person3 = FamTreeV2::Person.new
- @person3.id = 'regain03'
- @person3.add_name 'Pierre Auguste VAUDREY'
- @person3.add_gender 'Male'
- @person3.add_birth :date => '15 Aug 1908', :place => 'Beveuge, Haute-Saône'
- @person3.add_death :date => '03 may 1978', :place => 'Beveuge, Haute-Saône'
- #
- @person3.create_relationship :type => 'child', :with => 'regain01'
- #
- @person4 = FamTreeV2::Person.new
- @person4.id = 'regain04'
- @person4.add_name 'Louise Elise GROSMOUGIN'
- @person4.add_gender 'Female'
- @person4.add_birth :date => '16 Sep 1910', :place => 'Beveuge, Haute-Saône'
- @person4.add_death :date => '03 Feb 2005', :place => 'Villersexel, Haute-Saône'
- #
- @person1 = FamTreeV2::Person.new
- @person1.id = 'regain02'
- @person1.add_name 'Simone Marie BRUN'
- @person1.add_gender 'Female'
- @person1.add_birth :date => '27 Sep 1937', :place => 'Bourg-Saint-Christophe, Ain'
- @person1.create_relationship :type => 'spouse', :with => 'regain01', :event => {:type => 'Marriage',:place =>"Bourg-Saint-Christophe, Ain", :date => '31 Aug 1963'}
- #
- @person.create_relationship :type => 'spouse', :with => 'regain02', :event => {:type => 'Marriage',:place =>"Bourg-Saint-Christophe, Ain", :date => '31 Aug 1963'}
- @person.create_relationship :type => 'parent', :with => 'regain03'
- @person.create_relationship :type => 'parent', :with => 'regain04'
- pp JSON.parse(@person.to_json)
Add Comment
Please, Sign In to add comment