gitlab-org--gitlab-foss/app/models/bulk_imports/file_transfer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
452 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module BulkImports
module FileTransfer
extend self
UnsupportedObjectType = Class.new(StandardError)
def config_for(portable)
case portable
when ::Project
FileTransfer::ProjectConfig.new(portable)
when ::Group
FileTransfer::GroupConfig.new(portable)
else
raise(UnsupportedObjectType, "Unsupported object type: #{portable.class}")
end
end
end
end