class Services::AppDestroyer
Public Class Methods
call(app)
click to toggle source
# File lib/busbar_cli/services/app_destroyer.rb, line 3 def self.call(app) new(app).call end
new(app)
click to toggle source
# File lib/busbar_cli/services/app_destroyer.rb, line 7 def initialize(app) @app = app end
Public Instance Methods
call()
click to toggle source
# File lib/busbar_cli/services/app_destroyer.rb, line 11 def call confirm AppsRepository.destroy(app: @app) puts "App #{@app.id} is scheduled for destruction" end
Private Instance Methods
confirm()
click to toggle source
# File lib/busbar_cli/services/app_destroyer.rb, line 21 def confirm Confirmator.confirm( question: "Are you sure you want to destroy the app #{@app.id} " \ "and its enviroments on profile #{Services::Kube.current_profile}? " \ 'This action is irreversible.' ) end