Class: WorkItems::ParentLinks::DestroyService

Inherits:
IssuableLinks::DestroyService show all
Defined in:
app/services/work_items/parent_links/destroy_service.rb

Instance Attribute Summary collapse

Attributes inherited from IssuableLinks::DestroyService

#source, #target

Attributes inherited from BaseService

#params, #project

Instance Method Summary collapse

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?

Constructor Details

#initialize(link, user) ⇒ DestroyService

Returns a new instance of DestroyService.



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

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

Instance Attribute Details

#childObject (readonly)

Returns the value of attribute child.



6
7
8
# File 'app/services/work_items/parent_links/destroy_service.rb', line 6

def child
  @child
end

#current_userObject (readonly)

Returns the value of attribute current_user.



6
7
8
# File 'app/services/work_items/parent_links/destroy_service.rb', line 6

def current_user
  @current_user
end

Returns the value of attribute link.



6
7
8
# File 'app/services/work_items/parent_links/destroy_service.rb', line 6

def link
  @link
end

#parentObject (readonly)

Returns the value of attribute parent.



6
7
8
# File 'app/services/work_items/parent_links/destroy_service.rb', line 6

def parent
  @parent
end