Class: RabbitMQ::Definition::Drop
- Defined in:
- lib/rabbitmq_definition/drop.rb
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from Command
Constructor Details
This class inherits a constructor from RabbitMQ::Definition::Command
Instance Method Details
#execute ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/rabbitmq_definition/drop.rb', line 3 def execute if !FileDefinition.exists? Logger.error "No definition with vhosts exists" else if !agree("This will delete vhosts (#{vhost_names.join(',')}), continue? y/n".yellow) Logger.error "Aborted by user" else delete_vhosts Logger.progress "Removing definition..." definition.destroy Logger.success "Done" end end end |