Class: Repository_caln

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

Overview

Internal representation of the GEDCOM CALN record type, a sub-record of Repository_citation_record.

SOURCE_CALL_NUMBER:=

-1 REPO @XREF:REPO@               {1:1} Parent record
  ...
  n CALN <SOURCE_CALL_NUMBER>   {0:M} ** CALN record **
    +1 MEDI <SOURCE_MEDIA_TYPE>    {0:1}

The number used by a repository to identify the specific items in its collections.

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 CALN 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_caln

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



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

def initialize(*a)
  super(*a)
  @this_level =  [ [:print, "CALN", :call_number] ]  
  @sub_level =  [ #level + 1
                  [:print, "MEDI",  :media_type],
                  [:walk, nil,   :note_citation_record],
                ]
end

Instance Attribute Details

#call_numberObject

Returns the value of attribute call_number.



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

def call_number
  @call_number
end

#media_typeObject

Returns the value of attribute media_type.



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

def media_type
  @media_type
end

#note_citation_recordObject

Returns the value of attribute note_citation_record.



19
20
21
# File 'lib/gedcom/repository_caln.rb', line 19

def note_citation_record
  @note_citation_record
end