Class: BaseProjectService

Inherits:
BaseContainerService show all
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/services/base_project_service.rb

Overview

Base class, scoped by project

Instance Attribute Summary collapse

Attributes inherited from BaseContainerService

#container, #current_user, #params

Instance Method Summary collapse

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods inherited from BaseContainerService

#group_container?, #namespace_container?, #project_container?

Methods included from BaseServiceUtility

#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level

Methods included from Gitlab::Allowable

#can?

Constructor Details

#initialize(project:, current_user: nil, params: {}) ⇒ BaseProjectService

Returns a new instance of BaseProjectService.


9
10
11
12
13
# File 'app/services/base_project_service.rb', line 9

def initialize(project:, current_user: nil, params: {})
  super(container: project, current_user: current_user, params: params)

  @project = project
end

Instance Attribute Details

#projectObject

Returns the value of attribute project.


7
8
9
# File 'app/services/base_project_service.rb', line 7

def project
  @project
end