Class: Adoption_record

Inherits:
GEDCOMBase show all
Defined in:
lib/gedcom/adoption_record.rb

Overview

Adoption_record is a rarely seen sub-record of FAMC in Individual Event_record. These can occur is Event_record BIRT and ADOP event types.

=INDIVIDUAL_EVENT_STRUCTURE:= … -1 ADOP [Y|<NULL>] 1:1 (Not this ADOP record. This is the event.) … n FAMC @<XREF:FAM>@ 0:1 (This FAMC and its ADOP record.) +1 ADOP <ADOPTED_BY_WHICH_PARENT> 0:1 … n BIRT [Y|<NULL>] 1:1 … +1 FAMC @<XREF:FAM>@ 0:1 (And this FAMC in the BIRT Event.) …

==ADOPTED_BY_WHICH_PARENT:= Size=1:4 HUSB | WIFE | BOTH

A code which shows which parent in the associated family record adopted this person. Where: HUSB:: The HUSBand in the associated family adopted this person. WIFE:: The WIFE in the associated family adopted this person. BOTH:: Both HUSBand and WIFE adopted this person.

Linkage between a child and the family they belonged to at the time of an event can also optionally be shown by a FAMC pointer subordinate to the appropriate event. For example, a FAMC pointer subordinate to an adoption event would show which family adopted this individual. Biological parent or parents can be indicated by a FAMC pointer subordinate to the birth event. The FAMC tag can also optionally be used subordinate to an ADOPtion, or BIRTh event to differentiate which set of parents were related by adoption, sealing, or birth.

The attributes are all arrays for the level +1 tags/records. * Those ending in ref are GEDCOM XREF index keys * Those ending in record are array of classes of that type. * The remainder are arrays of attributes that could be present in this record.

Instance Attribute Summary collapse

Attributes inherited from GEDCOMBase

#restriction

Instance Method Summary collapse

Methods inherited from GEDCOMBase

#changed, #changed?, #created?, #find, #locked?, no_tabs, #private?, #save, tabs, #to_db, #to_gedcom, #to_s, #to_s_ordered, #to_s_r, #token_to_s, #xref_check

Constructor Details

#initialize(*a) ⇒ Adoption_record

new sets up the state engine arrays @this_level and @sub_level, which drive the to_gedcom method generating GEDCOM output.



45
46
47
48
49
50
51
52
53
54
# File 'lib/gedcom/adoption_record.rb', line 45

def initialize(*a)
  super(*a)
  @this_level = [ [:xref, "FAMC", :birth_family_ref ], #Only adopted family version of birth event record
                  [:xref, "FAMC", :adopt_family_ref]   #Adopted family version of ADOP event record
                ]
  @sub_level =  [ #level 1
                  [:print, "ADOP", :adopted_by], #Only adopted family version of ADOP event record
                  [:walk, nil,    :note_citation_record ]
                ]
end

Instance Attribute Details

#adopt_family_refObject

Returns the value of attribute adopt_family_ref.



39
40
41
# File 'lib/gedcom/adoption_record.rb', line 39

def adopt_family_ref
  @adopt_family_ref
end

#adopted_byObject

Returns the value of attribute adopted_by.



39
40
41
# File 'lib/gedcom/adoption_record.rb', line 39

def adopted_by
  @adopted_by
end

#birth_family_refObject

Returns the value of attribute birth_family_ref.



39
40
41
# File 'lib/gedcom/adoption_record.rb', line 39

def birth_family_ref
  @birth_family_ref
end

#note_citation_recordObject

Returns the value of attribute note_citation_record.



40
41
42
# File 'lib/gedcom/adoption_record.rb', line 40

def note_citation_record
  @note_citation_record
end