Class: VagrantPlugins::ProviderVeertu::Action::Resume
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderVeertu::Action::Resume
- Defined in:
- lib/vagrant-veertu/action/resume.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ Resume
constructor
A new instance of Resume.
Constructor Details
#initialize(app, env) ⇒ Resume
Returns a new instance of Resume.
5 6 7 |
# File 'lib/vagrant-veertu/action/resume.rb', line 5 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/vagrant-veertu/action/resume.rb', line 9 def call(env) current_state = env[:machine].state.id if current_state == :paused or current_state == :stopped env[:ui].info I18n.t("vagrant.actions.vm.resume.resuming") env[:machine].provider.driver.resume end @app.call(env) end |