Class: Copyright_record

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

Overview

Copyright_record was introduced in 0.9.3 to allow CONT and CONC tags after the COPR record. Gedcom 5.5 =HEADER:= n HEAD 1:1 +1 SOUR <APPROVED_SYSTEM_ID> 1:1 +2 VERS <VERSION_NUMBER> 0:1 +2 NAME <NAME_OF_PRODUCT> 0:1 +2 CORP <NAME_OF_BUSINESS> 0:1 +3 <<ADDRESS_STRUCTURE>> 0:1 +2 DATA <NAME_OF_SOURCE_DATA> 0:1 +3 DATE <PUBLICATION_DATE> 0:1 +3 COPR <COPYRIGHT_SOURCE_DATA> 0:1 … GEDCOM 5.5.1 =HEADER:= n HEAD 1:1 +1 SOUR <APPROVED_SYSTEM_ID> 1:1 +2 VERS <VERSION_NUMBER> 0:1 +2 NAME <NAME_OF_PRODUCT> 0:1 +2 CORP <NAME_OF_BUSINESS> 0:1 +3 <<ADDRESS_STRUCTURE>> 0:1 +2 DATA <NAME_OF_SOURCE_DATA> 0:1 +3 DATE <PUBLICATION_DATE> 0:1 +3 COPR <COPYRIGHT_SOURCE_DATA> 0:1 +4 [CONT|CONC]<COPYRIGHT_SOURCE_DATA> 0:M …

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) ⇒ Copyright_record

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



37
38
39
40
41
42
43
# File 'lib/gedcom/copyright_record.rb', line 37

def initialize(*a)
  super(*a)
  @this_level = [ [:cont, "COPR", :copyright] ]
  @sub_level =  [ #level + 1
                  [:walk, nil, :note_citation_record], #to allow for user defined subtags
                ]
end

Instance Attribute Details

Returns the value of attribute copyright.



31
32
33
# File 'lib/gedcom/copyright_record.rb', line 31

def copyright
  @copyright
end

#note_citation_recordObject

Returns the value of attribute note_citation_record.



32
33
34
# File 'lib/gedcom/copyright_record.rb', line 32

def note_citation_record
  @note_citation_record
end