Class: VagrantPlugins::ProviderLocal::Action::Restart
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderLocal::Action::Restart
- Includes:
- Vagrant::Util::Retryable
- Defined in:
- lib/vagrant-local/action/restart.rb
Overview
This is used to restart the instance
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ Restart
constructor
A new instance of Restart.
Constructor Details
#initialize(app, _env) ⇒ Restart
Returns a new instance of Restart.
13 14 15 16 |
# File 'lib/vagrant-local/action/restart.rb', line 13 def initialize(app, _env) @logger = Log4r::Logger.new('vagrant_local::action::restart') @app = app end |
Instance Method Details
#call(env) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/vagrant-local/action/restart.rb', line 18 def call(env) @machine = env[:machine] @driver = @machine.provider.driver @driver.control(env[:ui], 'restart') @app.call(env) end |