2021-06-08 01:23:25 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module BulkImports
|
|
|
|
module FileTransfer
|
|
|
|
extend self
|
|
|
|
|
|
|
|
UnsupportedObjectType = Class.new(StandardError)
|
|
|
|
|
|
|
|
def config_for(portable)
|
|
|
|
case portable
|
|
|
|
when ::Project
|
2023-05-27 22:25:52 +05:30
|
|
|
::BulkImports::FileTransfer::ProjectConfig.new(portable)
|
2021-06-08 01:23:25 +05:30
|
|
|
when ::Group
|
2023-05-27 22:25:52 +05:30
|
|
|
::BulkImports::FileTransfer::GroupConfig.new(portable)
|
2021-06-08 01:23:25 +05:30
|
|
|
else
|
|
|
|
raise(UnsupportedObjectType, "Unsupported object type: #{portable.class}")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|