MARC_set_wrangler.rb
# create specific config hash for this process
create specific config hash for this process
create specific config hash for this process
def merge_configs(c1, c2)
  c1.merge!(c2) { |k, v1, v2|
    if k == 'id affix value'
      "#{v1}#{v2}"
    elsif v1.class.name == 'Boolean'
      v2
    elsif v1.class.name == 'Array'
      v1 + v2
    elsif v1.class.name == 'String'
      v2
    elsif v1.class.name == 'TrueClass' || v1.class.name == 'FalseClass'
      v2
    else
      v1.merge!(v2)
    end
  }
  c1.each_pair { |k, v|
    v.uniq! if v.class.name == 'Array'
  }
  return c1
end
def merge_configs ( c1 , c2 ) c1 . merge! ( c2 ) { | k , v1 , v2 | if k == 'id affix value' "#{v1}#{v2}" elsif v1 . class . name == 'Boolean' v2 elsif v1 . class . name == 'Array' v1 + v2 elsif v1 . class . name == 'String' v2 elsif v1 . class . name == 'TrueClass' || v1 . class . name == 'FalseClass' v2 else v1 . merge! ( v2 ) end } c1 . each_pair { | k , v | v . uniq! if v . class . name == 'Array' } return c1 end
create specific config hash for this process
create specific config hash for this process
c1
c2