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



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

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



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

def config
  machine.config.bindfs
end

#guestObject



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

def guest
  machine.guest
end

#machineObject



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

def machine
  env[:machine]
end