Class: IssuableLinks::ListService
- Inherits:
-
Object
- Object
- IssuableLinks::ListService
- Includes:
- Gitlab::Routing
- Defined in:
- app/services/issuable_links/list_service.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#current_user ⇒ Object
readonly
Returns the value of attribute current_user.
-
#issuable ⇒ Object
readonly
Returns the value of attribute issuable.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(issuable, user) ⇒ ListService
constructor
A new instance of ListService.
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_user ⇒ Object (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 |
#issuable ⇒ Object (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
#execute ⇒ Object
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, ) end |