Class: Vagrant::Command::SuspendCommand

Inherits:
NamedBase
  • Object
show all
Defined in:
lib/vagrant/command/suspend.rb

Instance Attribute Summary

Attributes inherited from Base

#env

Instance Method Summary collapse

Methods inherited from Base

#initialize, register

Methods included from Helpers

#initialize_environment, #target_vms

Constructor Details

This class inherits a constructor from Vagrant::Command::Base

Instance Method Details

#executeObject



6
7
8
9
10
11
12
13
14
# File 'lib/vagrant/command/suspend.rb', line 6

def execute
  target_vms.each do |vm|
    if vm.created?
      vm.suspend
    else
      vm.env.ui.info I18n.t("vagrant.commands.common.vm_not_created")
    end
  end
end