Class: DesignManagement::DesignService
- Inherits:
-
BaseService
- Object
- BaseService
- DesignManagement::DesignService
- Defined in:
- app/services/design_management/design_service.rb
Direct Known Subclasses
CopyDesignCollection::CopyService, DeleteDesignsService, GenerateImageVersionsService, MoveDesignsService, SaveDesignsService
Instance Attribute Summary collapse
-
#issue ⇒ Object
readonly
Accessors common to all subclasses:.
Attributes inherited from BaseService
Instance Method Summary collapse
- #collection ⇒ Object (also: #design_collection)
-
#initialize(project, user, params = {}) ⇒ DesignService
constructor
A new instance of DesignService.
- #project ⇒ Object
- #repository ⇒ Object
- #target_branch ⇒ Object
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
Constructor Details
#initialize(project, user, params = {}) ⇒ DesignService
Returns a new instance of DesignService.
5 6 7 8 9 |
# File 'app/services/design_management/design_service.rb', line 5 def initialize(project, user, params = {}) super @issue = params.fetch(:issue) end |
Instance Attribute Details
#issue ⇒ Object (readonly)
Accessors common to all subclasses:
13 14 15 |
# File 'app/services/design_management/design_service.rb', line 13 def issue @issue end |
Instance Method Details
#collection ⇒ Object Also known as: design_collection
19 20 21 |
# File 'app/services/design_management/design_service.rb', line 19 def collection issue.design_collection end |
#project ⇒ Object
28 29 30 |
# File 'app/services/design_management/design_service.rb', line 28 def project issue.project end |
#repository ⇒ Object
24 25 26 |
# File 'app/services/design_management/design_service.rb', line 24 def repository collection.repository end |
#target_branch ⇒ Object
15 16 17 |
# File 'app/services/design_management/design_service.rb', line 15 def target_branch repository.root_ref || Gitlab::DefaultBranch.value(object: project) end |