Class: Clusters::DestroyService
- Inherits:
-
Object
- Object
- Clusters::DestroyService
- Defined in:
- app/services/clusters/destroy_service.rb
Instance Attribute Summary collapse
-
#current_user ⇒ Object
readonly
Returns the value of attribute current_user.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #execute(cluster) ⇒ Object
-
#initialize(user = nil, params = {}) ⇒ DestroyService
constructor
A new instance of DestroyService.
Constructor Details
#initialize(user = nil, params = {}) ⇒ DestroyService
Returns a new instance of DestroyService.
7 8 9 10 11 |
# File 'app/services/clusters/destroy_service.rb', line 7 def initialize(user = nil, params = {}) @current_user = user @params = params.dup @response = {} end |
Instance Attribute Details
#current_user ⇒ Object (readonly)
Returns the value of attribute current_user.
5 6 7 |
# File 'app/services/clusters/destroy_service.rb', line 5 def current_user @current_user end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'app/services/clusters/destroy_service.rb', line 5 def params @params end |
Instance Method Details
#execute(cluster) ⇒ Object
13 14 15 16 17 |
# File 'app/services/clusters/destroy_service.rb', line 13 def execute(cluster) cleanup? ? start_cleanup!(cluster) : destroy_cluster!(cluster) @response end |