Class: HashiCorp::VagrantVMwareDesktop::Action::PruneNFSExports

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/vagrant-vmware-desktop/action/prune_nfs_exports.rb

Instance Method Summary collapse

Methods included from Common

#to_s

Constructor Details

#initialize(app, env) ⇒ PruneNFSExports

Returns a new instance of PruneNFSExports.



10
11
12
# File 'lib/vagrant-vmware-desktop/action/prune_nfs_exports.rb', line 10

def initialize(app, env)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/vagrant-vmware-desktop/action/prune_nfs_exports.rb', line 14

def call(env)
  if env[:host]
    vms = env[:machine].provider.driver.read_running_vms
    env[:host].nfs_prune(vms)
  end

  @app.call(env)
end