Class: Todos::Destroy::GroupPrivateService
- Inherits:
-
BaseService
- Object
- BaseService
- Todos::Destroy::GroupPrivateService
- Extended by:
- Gitlab::Utils::Override
- Defined in:
- app/services/todos/destroy/group_private_service.rb
Instance Attribute Summary collapse
-
#group ⇒ Object
readonly
Returns the value of attribute group.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(group_id) ⇒ GroupPrivateService
constructor
A new instance of GroupPrivateService.
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
#group ⇒ Object (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
#execute ⇒ Object
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 |