lib/berkeley_library/tind/mapping/single_rule.rb
# Define a hash for single map rules, key is 'from subfield name',
# value is 'to subfield name'
Define a hash for single map rules, key is 'from subfield name',
value is 'to subfield name'
Define a hash for single map rules key is ' from subfield name ' value is ' to subfield name '
def single_map_dic(str_from, str_to)
          dic = {}
          if  should_single_map?(str_from, str_to)
            arr_from = str_from.strip.split(',')
            arr_to = str_to.strip.split(',')
            arr_from.each_with_index { |from_name, i| dic[from_name.to_s] = arr_to[i].to_s }
          end
          dic
        end
def single_map_dic ( str_from , str_to ) dic = { } if should_single_map? ( str_from , str_to ) arr_from = str_from . strip . split ( ',' ) arr_to = str_to . strip . split ( ',' ) arr_from . each_with_index { | from_name , i | dic [ from_name . to_s ] = arr_to [ i ] . to_s } end dic end
Define a hash for single map rules, key is 'from subfield name',
value is 'to subfield name'
Define a hash for single map rules key is ' from subfield name ' value is ' to subfield name '
str_from
<not_specific>
str_to
<not_specific>