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