lib/berkeley_library/tind/mapping/tind_field_from_single_map.rb
# 1.subfields mapped with single rule, mapping one subfield to another subfield
# 2. one subfield is mapped to one subfield
# 3. When mutiple subfields with the same name found in an orignal field,
# they will be mapped one by one
1.subfields mapped with single rule, mapping one subfield to another subfield
2. one subfield is mapped to one subfield
3. When mutiple subfields with the same name found in an orignal field,
they will be mapped one by one
1 . subfields mapped with single rule mapping one subfield to another subfield 2 . one subfield is mapped to one subfield 3 . When mutiple subfields with the same name found in an orignal field they will be mapped one by one
def subfields_from_single_map
          return [] if @single_mapping.empty?
          mapped_subfields = []
          @single_mapping.each do |from, to|
            subfields = subfields_from_to(@from_datafield, from, to)
            mapped_subfields.concat(subfields)
          end
          mapped_subfields
        end
def subfields_from_single_map return [ ] if @single_mapping . empty? mapped_subfields = [ ] @single_mapping . each do | from , to | subfields = subfields_from_to ( @from_datafield , from , to ) mapped_subfields . concat ( subfields ) end mapped_subfields end
1.subfields mapped with single rule, mapping one subfield to another subfield
2. one subfield is mapped to one subfield
3.
1 . subfields mapped with single rule mapping one subfield to another subfield 2 . one subfield is mapped to one subfield 3 .