Class: Services::AppDestroyer

Inherits:
Object
  • Object
show all
Defined in:
lib/busbar_cli/services/app_destroyer.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ AppDestroyer

Returns a new instance of AppDestroyer.



7
8
9
# File 'lib/busbar_cli/services/app_destroyer.rb', line 7

def initialize(app)
  @app = app
end

Class Method Details

.call(app) ⇒ Object



3
4
5
# File 'lib/busbar_cli/services/app_destroyer.rb', line 3

def self.call(app)
  new(app).call
end

Instance Method Details

#callObject



11
12
13
14
15
16
17
# 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