Class: IssuableLinks::ListService

Inherits:
Object
  • Object
show all
Includes:
Gitlab::Routing
Defined in:
app/services/issuable_links/list_service.rb

Direct Known Subclasses

IssueLinks::ListService

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Gitlab::Routing

includes_helpers, redirect_legacy_paths, url_helpers

Constructor Details

#initialize(issuable, user) ⇒ ListService

Returns a new instance of ListService.



9
10
11
12
# File 'app/services/issuable_links/list_service.rb', line 9

def initialize(issuable, user)
  @issuable = issuable
  @current_user = user
end

Instance Attribute Details

#current_userObject (readonly)

Returns the value of attribute current_user.



7
8
9
# File 'app/services/issuable_links/list_service.rb', line 7

def current_user
  @current_user
end

#issuableObject (readonly)

Returns the value of attribute issuable.



7
8
9
# File 'app/services/issuable_links/list_service.rb', line 7

def issuable
  @issuable
end

Instance Method Details

#executeObject



14
15
16
17
# File 'app/services/issuable_links/list_service.rb', line 14

def execute
  serializer.new(current_user: current_user, issuable: issuable)
    .represent(child_issuables, serializer_options)
end