Class: VagrantPlugins::Utm::Action::SnapshotRestore
- Inherits:
-
Object
- Object
- VagrantPlugins::Utm::Action::SnapshotRestore
- Defined in:
- lib/vagrant_utm/action/snapshot_restore.rb
Overview
rubocop:disable Style/Documentation
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ SnapshotRestore
constructor
A new instance of SnapshotRestore.
Constructor Details
#initialize(app, _env) ⇒ SnapshotRestore
10 11 12 |
# File 'lib/vagrant_utm/action/snapshot_restore.rb', line 10 def initialize(app, _env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/vagrant_utm/action/snapshot_restore.rb', line 14 def call(env) env[:ui].info(I18n.t( "vagrant.actions.vm.snapshot.restoring", name: env[:snapshot_name] )) env[:machine].provider.driver.restore_snapshot( env[:machine].id, env[:snapshot_name] ) @app.call(env) end |