Sha256: 274188c256ceb3f8683b8e13f9ababe8ab0b01ac16b4a203acd05372dcb52edb

Contents?: true

Size: 429 Bytes

Versions: 6

Compression:

Stored size: 429 Bytes

Contents

module Ddr::IngestTools::DdrRdrMigrator
  class ColumnRemover

    attr_reader :logger, :manifest

    UNNEEDED_COLUMNS = [ 'model', 'pid' ].freeze

    def initialize(logger: nil, manifest:)
      @logger = logger || Logger.new(STDOUT)
      @manifest = manifest
    end

    def call
      remove
      manifest
    end

    private

    def remove
      UNNEEDED_COLUMNS.each { |col| manifest.delete(col) }
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ddr-ingesttools-0.6.1 lib/ddr/ingesttools/ddr_rdr_migrator/column_remover.rb
ddr-ingesttools-0.6.0 lib/ddr/ingesttools/ddr_rdr_migrator/column_remover.rb
ddr-ingesttools-0.5.0 lib/ddr/ingesttools/ddr_rdr_migrator/column_remover.rb
ddr-ingesttools-0.5.0.rc3 lib/ddr/ingesttools/ddr_rdr_migrator/column_remover.rb
ddr-ingesttools-0.5.0.rc2 lib/ddr/ingesttools/ddr_rdr_migrator/column_remover.rb
ddr-ingesttools-0.5.0.rc1 lib/ddr/ingesttools/ddr_rdr_migrator/column_remover.rb