Module: VagrantBindfs::Vagrant::Actions::Concerns::Machine

Included in:
Installer, Mounter
Defined in:
lib/vagrant-bindfs/vagrant/actions/concerns/machine.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#bound_folders(hook = nil) ⇒ Object



16
17
18
19
20
21
# File 'lib/vagrant-bindfs/vagrant/actions/concerns/machine.rb', line 16

def bound_folders(hook = nil)
  @bound_folders ||= config.bound_folders.each_with_object({}) do |(id, folder), bound|
    bound[id] = folder if hook.nil? || folder.hook == hook
    bound
  end
end

#configObject



12
13
14
# File 'lib/vagrant-bindfs/vagrant/actions/concerns/machine.rb', line 12

def config
  machine.config.bindfs
end

#guestObject



23
24
25
# File 'lib/vagrant-bindfs/vagrant/actions/concerns/machine.rb', line 23

def guest
  machine.guest
end

#machineObject



8
9
10
# File 'lib/vagrant-bindfs/vagrant/actions/concerns/machine.rb', line 8

def machine
  env[:machine]
end