Class: Repository_record

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

Overview

Internal representation of the GEDCOM REPO record type This class is referenced through the Repository_citation_record class.

=REPOSITORY_RECORD:= 0 @XREF:REPO@ REPO 0:M +1 NAME <NAME_OF_REPOSITORY> 0:1 +1 <<ADDRESS_STRUCTURE>> 0:1 +1 <<NOTE_STRUCTURE>> 0:M +1 REFN <USER_REFERENCE_NUMBER> 0:M +2 TYPE <USER_REFERENCE_TYPE> 0:1 +1 RIN <AUTOMATED_RECORD_ID> 0:1 +1 <<CHANGE_DATE>> 0:1

The attributes are all arrays for the +1 level 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 the REPO records.

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, #token_to_s

Constructor Details

#initialize(*a) ⇒ Repository_record

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



27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/gedcom/repository_record.rb', line 27

def initialize(*a)
  super(*a)
  @this_level = [ [:xref, "REPO", :repository_ref]]
  @sub_level =  [#level 1
                  [:print, "NAME",    :repository_name ],
                  [:print, "PHON",    :phonenumber ],
                  [:walk, nil,    :address_record ],
                  [:walk, nil,    :note_citation_record ],
                  [:walk, nil,     :refn_record ],
                  [:print, "RIN",    :automated_record_id ],
                  [:walk, nil,    :change_date_record ],
                ]
end

Instance Attribute Details

#address_recordObject

Returns the value of attribute address_record.



21
22
23
# File 'lib/gedcom/repository_record.rb', line 21

def address_record
  @address_record
end

#automated_record_idObject

Returns the value of attribute automated_record_id.



22
23
24
# File 'lib/gedcom/repository_record.rb', line 22

def automated_record_id
  @automated_record_id
end

#change_date_recordObject

Returns the value of attribute change_date_record.



22
23
24
# File 'lib/gedcom/repository_record.rb', line 22

def change_date_record
  @change_date_record
end

#note_citation_recordObject

Returns the value of attribute note_citation_record.



21
22
23
# File 'lib/gedcom/repository_record.rb', line 21

def note_citation_record
  @note_citation_record
end

#phonenumberObject

Returns the value of attribute phonenumber.



21
22
23
# File 'lib/gedcom/repository_record.rb', line 21

def phonenumber
  @phonenumber
end

#refn_recordObject

Returns the value of attribute refn_record.



22
23
24
# File 'lib/gedcom/repository_record.rb', line 22

def refn_record
  @refn_record
end

#repository_nameObject

Returns the value of attribute repository_name.



21
22
23
# File 'lib/gedcom/repository_record.rb', line 21

def repository_name
  @repository_name
end

#repository_refObject

Returns the value of attribute repository_ref.



21
22
23
# File 'lib/gedcom/repository_record.rb', line 21

def repository_ref
  @repository_ref
end