Class: Refn_record

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

Overview

Internal representation of the GEDCOM REFN record type. A sub-record of the level 0 INDI,FAM,OBJE,NOTE,REPO,SOUR records.

=REFN REFERENCE:=

n REFN <USER_REFERENCE_NUMBER> 0:M +1 TYPE <USER_REFERENCE_TYPE> 0:1

A description or number used to identify an item for filing, storage, or other reference purposes.

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 the REFN 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, #to_s_ordered, #to_s_r, #token_to_s, #xref_check

Constructor Details

#initialize(*a) ⇒ Refn_record

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



23
24
25
26
27
28
29
30
# File 'lib/gedcom/refn_record.rb', line 23

def initialize(*a)
  super(*a)
  @this_level =  [ [:print, "REFN", :user_reference_number] ]  
  @sub_level =  [ #level + 1
                  [:print, "TYPE", :ref_type],
                  [:walk, nil,  :note_citation_record],
                ]
end

Instance Attribute Details

#note_citation_recordObject

Returns the value of attribute note_citation_record.



18
19
20
# File 'lib/gedcom/refn_record.rb', line 18

def note_citation_record
  @note_citation_record
end

#ref_typeObject

Returns the value of attribute ref_type.



17
18
19
# File 'lib/gedcom/refn_record.rb', line 17

def ref_type
  @ref_type
end

#user_reference_numberObject

Returns the value of attribute user_reference_number.



17
18
19
# File 'lib/gedcom/refn_record.rb', line 17

def user_reference_number
  @user_reference_number
end