lib/gedcom/source_citation_record.rb
#to_gedcom sets up the state engine arrays @this_level and @sub_level, which drive the parent class to_gedcom method generating GEDCOM output.
#There are two types of SOUR record, inline and reference, so this is done dynamically in to_gedcom rather than the initialize method.
#Probably should be two classes, rather than this conditional.
to_gedcom sets up the state engine arrays @this_level and @sub_level, which drive the parent class to_gedcom method generating GEDCOM output.
There are two types of SOUR record, inline and reference, so this is done dynamically in to_gedcom rather than the initialize method.
Probably should be two classes, rather than this conditional.
to_gedcom sets up the state engine arrays @this_level and @sub_level which drive the parent class to_gedcom method generating GEDCOM output . There are two types of SOUR record inline and reference so this is done dynamically in to_gedcom rather than the initialize method . Probably should be two classes rather than this conditional .
def to_gedcom(level=0)
    if(@source_ref != nil)
      @this_level = [ [:xref, "SOUR", :source_ref] ]
      @sub_level =  [  
                      [:print, "PAGE", :page],
                      [:walk, nil,    :citation_event_type_record],
                      [:walk, nil,    :citation_data_record],
                      [:print, "QUAY",  :quality],
                      [:walk, nil,  :multimedia_citation_record],
                      [:walk, nil,  :note_citation_record],
                    ]
     elsif @source_record != nil
       @this_level = [ [:walk, nil,  :source_record] ]
       @sub_level =  []
     end
     super(level)
  end
def to_gedcom ( level = 0 ) if ( @source_ref != nil ) @this_level = [ [ :xref , "SOUR" , :source_ref ] ] @sub_level = [ [ :print , "PAGE" , :page ] , [ :walk , nil , :citation_event_type_record ] , [ :walk , nil , :citation_data_record ] , [ :print , "QUAY" , :quality ] , [ :walk , nil , :multimedia_citation_record ] , [ :walk , nil , :note_citation_record ] , ] elsif @source_record != nil @this_level = [ [ :walk , nil , :source_record ] ] @sub_level = [ ] end super ( level ) end
to_gedcom sets up the state engine arrays @this_level and @sub_level, which drive the parent class to_gedcom method generating GEDCOM output.
to_gedcom sets up the state engine arrays @this_level and @sub_level which drive the parent class to_gedcom method generating GEDCOM output .
#level + 1
level