Class: Gitlab::Issuable::Clone::CopyResourceEventsService

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/issuable/clone/copy_resource_events_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(current_user, original_entity, new_entity) ⇒ CopyResourceEventsService

Returns a new instance of CopyResourceEventsService.



9
10
11
12
13
# File 'lib/gitlab/issuable/clone/copy_resource_events_service.rb', line 9

def initialize(current_user, original_entity, new_entity)
  @current_user = current_user
  @original_entity = original_entity
  @new_entity = new_entity
end

Instance Attribute Details

#current_userObject (readonly)

Returns the value of attribute current_user.



7
8
9
# File 'lib/gitlab/issuable/clone/copy_resource_events_service.rb', line 7

def current_user
  @current_user
end

#new_entityObject (readonly)

Returns the value of attribute new_entity.



7
8
9
# File 'lib/gitlab/issuable/clone/copy_resource_events_service.rb', line 7

def new_entity
  @new_entity
end

#original_entityObject (readonly)

Returns the value of attribute original_entity.



7
8
9
# File 'lib/gitlab/issuable/clone/copy_resource_events_service.rb', line 7

def original_entity
  @original_entity
end

Instance Method Details

#executeObject



15
16
17
18
19
# File 'lib/gitlab/issuable/clone/copy_resource_events_service.rb', line 15

def execute
  copy_resource_label_events
  copy_resource_milestone_events
  copy_resource_state_events
end