Class: Mccloud::Command::UnDefineCommand
- Defined in:
- lib/mccloud/command/undefine.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Methods included from Helpers
Constructor Details
This class inherits a constructor from Mccloud::Command::Base
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/mccloud/command/undefine.rb', line 9 def execute env.ui.info "Undefine machine #{name}" filename=File.join("vms","#{name}.rb") if File.exists?(filename) env.ui.info "Removing #{filename}" FileUtils.rm(filename) else env.ui.info "Machine #{name} has not yet defined" end end |