Class: Org::Familysearch::Ws::Familytree::V2::Schema::PedigreePerson

Inherits:
Person
  • Object
show all
Defined in:
lib/ruby-fs-stack/familytree/pedigree.rb

Instance Attribute Summary collapse

Attributes inherited from Person

#assertions, #changes, #discussions, #families, #id, #identifiers, #parents, #personId, #personas, #properties, #relationships, #requestedId, #tempId, #version, #watches

Instance Method Summary collapse

Methods inherited from Person

#add_baptism, #add_birth, #add_confirmation, #add_death, #add_endowment, #add_gender, #add_initiatory, #add_name, #add_sealing_to_parents, #baptisms, #birth, #births, #confirmations, #create_combine, #create_relationship, #death, #deaths, #divorces, #endowments, #father_id, from_json, #full_name, #full_names, #gender, #init_jaxb_json_hash, #initiatories, #marriages, #mother_id, #sealing_to_parents, #sealing_to_spouses, #select_birth_summary, #select_death_summary, #select_father_summary, #select_mother_summary, #select_name_summary, #select_spouse_summary, #spouse_id, #surname, #surnames, #to_jaxb_json_hash, #to_json

Constructor Details

#initialize(pedigree = nil, person = nil) ⇒ PedigreePerson

Returns a new instance of PedigreePerson.



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ruby-fs-stack/familytree/pedigree.rb', line 5

def initialize(pedigree = nil, person = nil)
  if person
    @id = person.id
    # @version = person.version if person.version
    @assertions = person.assertions if person.assertions
    @families = person.families if person.families
    @parents = person.parents if person.parents
    @properties = person.properties if person.properties
  end
  if pedigree
    @pedigree = pedigree
  end
end

Instance Attribute Details

#pedigreeObject

Returns the value of attribute pedigree.



3
4
5
# File 'lib/ruby-fs-stack/familytree/pedigree.rb', line 3

def pedigree
  @pedigree
end

Instance Method Details

#fatherObject



19
20
21
# File 'lib/ruby-fs-stack/familytree/pedigree.rb', line 19

def father
  pedigree.get_person(father_id)
end

#motherObject



23
24
25
# File 'lib/ruby-fs-stack/familytree/pedigree.rb', line 23

def mother
  pedigree.get_person(mother_id)
end