Class: Todos::Destroy::GroupPrivateService

Inherits:
BaseService
  • Object
show all
Extended by:
Gitlab::Utils::Override
Defined in:
app/services/todos/destroy/group_private_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Gitlab::Utils::Override

extended, extensions, included, method_added, override, prepended, queue_verification, verify!

Constructor Details

#initialize(group_id) ⇒ GroupPrivateService

Returns a new instance of GroupPrivateService.



10
11
12
# File 'app/services/todos/destroy/group_private_service.rb', line 10

def initialize(group_id)
  @group = Group.find_by_id(group_id)
end

Instance Attribute Details

#groupObject (readonly)

Returns the value of attribute group.



8
9
10
# File 'app/services/todos/destroy/group_private_service.rb', line 8

def group
  @group
end

Instance Method Details

#executeObject



14
15
16
17
18
# File 'app/services/todos/destroy/group_private_service.rb', line 14

def execute
  return unless todos_to_remove?

  delete_todos
end