Class: VagrantPlugins::ProviderVirtualBox::Action::SnapshotTake
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderVirtualBox::Action::SnapshotTake
- Defined in:
- lib/vagrant-multiprovider-snap/providers/virtualbox/action/snapshot_take.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ SnapshotTake
constructor
A new instance of SnapshotTake.
Constructor Details
#initialize(app, env) ⇒ SnapshotTake
Returns a new instance of SnapshotTake.
9 10 11 |
# File 'lib/vagrant-multiprovider-snap/providers/virtualbox/action/snapshot_take.rb', line 9 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/vagrant-multiprovider-snap/providers/virtualbox/action/snapshot_take.rb', line 13 def call(env) if env[:snap_name].nil? env[:ui].info I18n.t("vagrant_snap.actions.vm.snapshot_take.taking") else env[:ui].info(I18n.t("vagrant_snap.actions.vm.snapshot_take.taking_named", :snapshot => env[:snap_name]), ) end env[:machine].provider.driver.snapshot_take(env[:snap_name]) @app.call(env) end |