blob: c6af4e0c8331439e348585e4071d53834af3befa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# frozen_string_literal: true
module BulkImports
module FileTransfer
extend self
UnsupportedObjectType = Class.new(StandardError)
def config_for(portable)
case portable
when ::Project
::BulkImports::FileTransfer::ProjectConfig.new(portable)
when ::Group
::BulkImports::FileTransfer::GroupConfig.new(portable)
else
raise(UnsupportedObjectType, "Unsupported object type: #{portable.class}")
end
end
end
end
|