Class: ProtectedBranches::BaseService
- Inherits:
-
BaseService
- Object
- BaseService
- ProtectedBranches::BaseService
- Defined in:
- app/services/protected_branches/base_service.rb
Direct Known Subclasses
ApiService, CacheService, CreateService, DestroyService, LegacyApiCreateService, LegacyApiUpdateService, UpdateService
Instance Attribute Summary collapse
-
#project_or_group ⇒ Object
readonly
Returns the value of attribute project_or_group.
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
- #after_execute ⇒ Object
-
#initialize(project_or_group, current_user = nil, params = {}) ⇒ BaseService
constructor
current_user - The user that performs the action params - A hash of parameters.
- #refresh_cache ⇒ 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_or_group, current_user = nil, params = {}) ⇒ BaseService
current_user - The user that performs the action params - A hash of parameters
9 10 11 12 13 |
# File 'app/services/protected_branches/base_service.rb', line 9 def initialize(project_or_group, current_user = nil, params = {}) @project_or_group = project_or_group @current_user = current_user @params = params end |
Instance Attribute Details
#project_or_group ⇒ Object (readonly)
Returns the value of attribute project_or_group.
5 6 7 |
# File 'app/services/protected_branches/base_service.rb', line 5 def project_or_group @project_or_group end |
Instance Method Details
#after_execute ⇒ Object
15 16 17 |
# File 'app/services/protected_branches/base_service.rb', line 15 def after_execute(*) # overridden in EE::ProtectedBranches module end |
#refresh_cache ⇒ Object
19 20 21 22 23 |
# File 'app/services/protected_branches/base_service.rb', line 19 def refresh_cache CacheService.new(@project_or_group, @current_user, @params).refresh rescue StandardError => e Gitlab::ErrorTracking.track_exception(e) end |