Class: Services::DatabaseDestroyer
- Inherits:
-
Object
- Object
- Services::DatabaseDestroyer
- Defined in:
- lib/busbar_cli/services/database_destroyer.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(database) ⇒ DatabaseDestroyer
constructor
A new instance of DatabaseDestroyer.
Constructor Details
#initialize(database) ⇒ DatabaseDestroyer
Returns a new instance of DatabaseDestroyer.
7 8 9 |
# File 'lib/busbar_cli/services/database_destroyer.rb', line 7 def initialize(database) @database = database end |
Class Method Details
.call(database) ⇒ Object
3 4 5 |
# File 'lib/busbar_cli/services/database_destroyer.rb', line 3 def self.call(database) new(database).call end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/busbar_cli/services/database_destroyer.rb', line 11 def call confirm DatabasesRepository.destroy(database: @database) puts "Database #{@database.id} is scheduled for destruction" end |