Class: Ci::NamespaceSettings::UpdateService
- Inherits:
-
Object
- Object
- Ci::NamespaceSettings::UpdateService
- Defined in:
- app/services/ci/namespace_settings/update_service.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(settings, args) ⇒ UpdateService
constructor
A new instance of UpdateService.
Constructor Details
#initialize(settings, args) ⇒ UpdateService
Returns a new instance of UpdateService.
6 7 8 9 |
# File 'app/services/ci/namespace_settings/update_service.rb', line 6 def initialize(settings, args) @settings = settings @args = args end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/services/ci/namespace_settings/update_service.rb', line 11 def execute return ServiceResponse.success if settings.update(args) ServiceResponse.error(message: settings.errors.) rescue ArgumentError => e ServiceResponse.error(message: [e.]) end |