Class: Todos::Destroy::ProjectPrivateService
- Inherits:
-
BaseService
- Object
- BaseService
- Todos::Destroy::ProjectPrivateService
- Extended by:
- Gitlab::Utils::Override
- Defined in:
- app/services/todos/destroy/project_private_service.rb
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(project_id) ⇒ ProjectPrivateService
constructor
A new instance of ProjectPrivateService.
Methods included from Gitlab::Utils::Override
extended, extensions, included, method_added, override, prepended, queue_verification, verify!
Constructor Details
#initialize(project_id) ⇒ ProjectPrivateService
Returns a new instance of ProjectPrivateService.
10 11 12 |
# File 'app/services/todos/destroy/project_private_service.rb', line 10 def initialize(project_id) @project = Project.find_by_id(project_id) end |
Instance Attribute Details
#project ⇒ Object (readonly)
Returns the value of attribute project.
8 9 10 |
# File 'app/services/todos/destroy/project_private_service.rb', line 8 def project @project end |
Instance Method Details
#execute ⇒ Object
14 15 16 17 18 |
# File 'app/services/todos/destroy/project_private_service.rb', line 14 def execute return unless todos_to_remove? delete_todos end |