Sha256: 6248de9b87b7ecae40ce87821bec341e9bcfd15d23e041f960b9765746f1aa5b
Contents?: true
Size: 556 Bytes
Versions: 16
Compression:
Stored size: 556 Bytes
Contents
require 'fileutils' module Mccloud module Command class UnDefineCommand < Base register "undefine NAME", "Undefines a machine" argument :name, :type => :string, :optional => false, :default => nil 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 end end end
Version data entries
16 entries across 16 versions & 1 rubygems