Class: Source_scope_record

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

Overview

Internal representation of the GEDCOM DATA record type, a record type under the GEDCOM Level 0 SOUR record type

SOURCE_RECORD:=

0 @<XREF:SOUR>@ SOUR                       {0:M}
  +1 DATA                                  {0:1}
    +2 EVEN <EVENTS_RECORDED>              {0:M}
      +3 DATE <DATE_PERIOD>                {0:1}
      +3 PLAC <SOURCE_JURISDICTION_PLACE>  {0:1}
    +2 AGNC <RESPONSIBLE_AGENCY>           {0:1}
    +2 <<NOTE_STRUCTURE>>                  {0:M}
  ...

The attributes are all arrays.

  • Those ending in _record are array of classes of that type.

  • The remainder are arrays of attributes that could be present in the SOUR.DATA 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) ⇒ Source_scope_record

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



25
26
27
28
29
30
31
32
33
# File 'lib/gedcom/source_scope_record.rb', line 25

def initialize(*a)
  super(*a)
  @this_level = [[:nodata, "DATA", nil]]
  @sub_level =  [ #level + 1
                  [:walk, nil, :events_list_record],
                  [:print, "AGNC",:agency],
                  [:walk, nil, :note_citation_record],
                ]
end

Instance Attribute Details

#agencyObject

Returns the value of attribute agency.



20
21
22
# File 'lib/gedcom/source_scope_record.rb', line 20

def agency
  @agency
end

#events_list_recordObject

Returns the value of attribute events_list_record.



20
21
22
# File 'lib/gedcom/source_scope_record.rb', line 20

def events_list_record
  @events_list_record
end

#note_citation_recordObject

Returns the value of attribute note_citation_record.



20
21
22
# File 'lib/gedcom/source_scope_record.rb', line 20

def note_citation_record
  @note_citation_record
end