Class: WorkItems::ParentLinks::DestroyService

Inherits:
IssuableLinks::DestroyService show all
Extended by:
Gitlab::Utils::Override
Defined in:
app/services/work_items/parent_links/destroy_service.rb

Constant Summary

Constants inherited from BaseService

BaseService::UnauthorizedError

Instance Attribute Summary collapse

Attributes inherited from IssuableLinks::DestroyService

#source, #target

Attributes inherited from BaseService

#project

Instance Method Summary collapse

Methods included from Gitlab::Utils::Override

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

Methods inherited from IssuableLinks::DestroyService

#execute

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?, #can_all?, #can_any?

Constructor Details

#initialize(link, user, params = {}) ⇒ DestroyService

Returns a new instance of DestroyService.



10
11
12
13
14
15
16
# File 'app/services/work_items/parent_links/destroy_service.rb', line 10

def initialize(link, user, params = {})
  @link = link
  @current_user = user
  @params = params
  @parent = link.work_item_parent
  @child = link.work_item
end

Instance Attribute Details

#childObject (readonly)

Returns the value of attribute child.



8
9
10
# File 'app/services/work_items/parent_links/destroy_service.rb', line 8

def child
  @child
end

#current_userObject (readonly)

Returns the value of attribute current_user.



8
9
10
# File 'app/services/work_items/parent_links/destroy_service.rb', line 8

def current_user
  @current_user
end

Returns the value of attribute link.



8
9
10
# File 'app/services/work_items/parent_links/destroy_service.rb', line 8

def link
  @link
end

#paramsObject (readonly)

Returns the value of attribute params.



8
9
10
# File 'app/services/work_items/parent_links/destroy_service.rb', line 8

def params
  @params
end

#parentObject (readonly)

Returns the value of attribute parent.



8
9
10
# File 'app/services/work_items/parent_links/destroy_service.rb', line 8

def parent
  @parent
end