Class: Projects::GitlabProjectsImportService
- Inherits:
-
Object
- Object
- Projects::GitlabProjectsImportService
- Includes:
- Gitlab::TemplateHelper, Gitlab::Utils::StrongMemoize
- Defined in:
- app/services/projects/gitlab_projects_import_service.rb
Instance Attribute Summary collapse
-
#current_user ⇒ Object
readonly
Returns the value of attribute current_user.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(user, import_params, override_params = nil) ⇒ GitlabProjectsImportService
constructor
A new instance of GitlabProjectsImportService.
Methods included from Gitlab::TemplateHelper
#prepare_template_environment, #tmp_filename
Constructor Details
#initialize(user, import_params, override_params = nil) ⇒ GitlabProjectsImportService
Returns a new instance of GitlabProjectsImportService.
13 14 15 16 17 |
# File 'app/services/projects/gitlab_projects_import_service.rb', line 13 def initialize(user, import_params, override_params = nil) @current_user = user @params = import_params.dup @override_params = override_params end |
Instance Attribute Details
#current_user ⇒ Object (readonly)
Returns the value of attribute current_user.
11 12 13 |
# File 'app/services/projects/gitlab_projects_import_service.rb', line 11 def current_user @current_user end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
11 12 13 |
# File 'app/services/projects/gitlab_projects_import_service.rb', line 11 def params @params end |
Instance Method Details
#execute ⇒ Object
19 20 21 22 23 24 25 |
# File 'app/services/projects/gitlab_projects_import_service.rb', line 19 def execute prepare_template_environment(template_file, current_user) prepare_import_params ::Projects::CreateService.new(current_user, params).execute end |