Sha256: f8732ae83cb01ca9d2b09bae840dc12b0c6c8a5edf6e51fa3d15faca7c4b9b75

Contents?: true

Size: 958 Bytes

Versions: 4

Compression:

Stored size: 958 Bytes

Contents

require 'marc'

module BerkeleyLibrary
  module TIND
    module Mapping
      class Config

        class << self

          def one_to_one_map_file
            ENV.fetch('ONE_TO_ONE_MAP_FILE', File.expand_path('data/one_to_one_mapping.csv', __dir__))
          end

          def one_to_multiple_map_file
            ENV.fetch('ONE_TO_ONE_MAP_FILE', File.expand_path('data/one_to_multiple_mapping.csv', __dir__))
          end

          def no_duplicated_tags
            %w[245 260 852 901 902 980].freeze
          end

          def punctuations
            %w[, : ; / =].freeze
          end

          def clean_tags
            %w[245 260 300].freeze
          end

          def collection_subfield_names
            {
              '336' => ['a'],
              '852' => ['c'],
              '980' => ['a'],
              '982' => ['a', 'b'],
              '991' => ['a']
            }.freeze
          end

        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
berkeley_library-tind-0.7.2 lib/berkeley_library/tind/mapping/config.rb
berkeley_library-tind-0.7.1 lib/berkeley_library/tind/mapping/config.rb
berkeley_library-tind-0.7.0 lib/berkeley_library/tind/mapping/config.rb
berkeley_library-tind-0.6.0 lib/berkeley_library/tind/mapping/config.rb