class Vixen::CommandLine::Vm

Public Instance Methods

execute() click to toggle source
# File lib/vixen/command_line/vm.rb, line 4
def execute
  machines = ARGV.shift

  return puts "A path to a virtual machine must be included" if machines.nil?

  powered_count = 0

  vm_paths = machines.split ','
  vms = []
  vm_paths.each do |path|
    vm = new_line_after do
      host.open_vm path do
        print "Opening #{path}"
      end
    end
    vms << vm
  end
  context[:vms] = vms
end