Class: Ci::Runners::UnregisterRunnerManagerService
- Inherits:
-
Object
- Object
- Ci::Runners::UnregisterRunnerManagerService
- Defined in:
- app/services/ci/runners/unregister_runner_manager_service.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#runner ⇒ Object
readonly
Returns the value of attribute runner.
-
#system_id ⇒ Object
readonly
Returns the value of attribute system_id.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(runner, author, system_id:) ⇒ UnregisterRunnerManagerService
constructor
A new instance of UnregisterRunnerManagerService.
Constructor Details
#initialize(runner, author, system_id:) ⇒ UnregisterRunnerManagerService
Returns a new instance of UnregisterRunnerManagerService.
11 12 13 14 15 |
# File 'app/services/ci/runners/unregister_runner_manager_service.rb', line 11 def initialize(runner, , system_id:) @runner = runner @author = @system_id = system_id end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
6 7 8 |
# File 'app/services/ci/runners/unregister_runner_manager_service.rb', line 6 def @author end |
#runner ⇒ Object (readonly)
Returns the value of attribute runner.
6 7 8 |
# File 'app/services/ci/runners/unregister_runner_manager_service.rb', line 6 def runner @runner end |
#system_id ⇒ Object (readonly)
Returns the value of attribute system_id.
6 7 8 |
# File 'app/services/ci/runners/unregister_runner_manager_service.rb', line 6 def system_id @system_id end |
Instance Method Details
#execute ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'app/services/ci/runners/unregister_runner_manager_service.rb', line 17 def execute return system_id_missing_error if system_id.blank? runner_manager = runner.runner_managers.find_by_system_xid!(system_id) runner_manager.destroy! ServiceResponse.success end |