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

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

Instance Method Summary collapse

Instance Method Details

#binded_folders(hook = nil) ⇒ Object



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

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

#configObject



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

def config
  machine.config.bindfs
end

#guestObject



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

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