Class: HashiCorp::VagrantVMwarefusion::Action::Unmount
- Inherits:
-
Object
- Object
- HashiCorp::VagrantVMwarefusion::Action::Unmount
- Defined in:
- lib/vagrant-mount/actions/providers/vmware-fusion/action/unmount.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ Unmount
constructor
A new instance of Unmount.
Constructor Details
#initialize(app, env) ⇒ Unmount
Returns a new instance of Unmount.
5 6 7 8 |
# File 'lib/vagrant-mount/actions/providers/vmware-fusion/action/unmount.rb', line 5 def initialize(app, env) @app = app @env = env end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/vagrant-mount/actions/providers/vmware-fusion/action/unmount.rb', line 10 def call(env) if env[:mount_point] env[:ui].info(I18n.t('vagrant_mount.actions.vm.unmount.unmounting', mount: env[:mount_point])) else env[:ui].info(I18n.t('vagrant_mount.actions.vm.unmount.unmounting_all')) end env[:result] = env[:machine].provider.driver.unmount(env[:mount_point], env[:remove_device]) if env[:mount_point] env[:ui].info(I18n.t('vagrant_mount.actions.vm.unmount.unmounted', mount: env[:mount_point])) else env[:ui].info(I18n.t('vagrant_mount.actions.vm.unmount.unmounted_all')) end @app.call(env) end |