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
add_helpers, includes_helpers, redirect_legacy_paths, url_helpers
Constructor Details
#initialize(issuable, user) ⇒ ListService
Returns a new instance of ListService.
9 10 11 |
# File 'app/services/issuable_links/list_service.rb', line 9 def initialize(issuable, user) @issuable, @current_user = issuable, 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
13 14 15 |
# File 'app/services/issuable_links/list_service.rb', line 13 def execute serializer.new(current_user: current_user, issuable: issuable).represent(child_issuables) end |