Module: VagrantPlugins::ProviderVirtualBox::Action

Defined in:
lib/vagrant-mount/actions/providers/virtualbox/action.rb,
lib/vagrant-mount/actions/providers/virtualbox/action/mount.rb,
lib/vagrant-mount/actions/providers/virtualbox/action/unmount.rb,
lib/vagrant-mount/actions/providers/virtualbox/action/message_not_mounted.rb,
lib/vagrant-mount/actions/providers/virtualbox/action/message_not_unmounted.rb

Defined Under Namespace

Classes: MessageNotMounted, MessageNotUnmounted, Mount, Unmount

Class Method Summary collapse

Class Method Details

.action_mountObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/vagrant-mount/actions/providers/virtualbox/action.rb', line 11

def self.action_mount
  Vagrant::Action::Builder.new.tap do |builder|
    builder.use CheckVirtualbox
    builder.use Call, Created do |created_env, created_builder|
      if created_env[:result]
        created_builder.use CheckAccessible
        created_builder.use Call, Mount do |mount_env, mount_builder|
          unless mount_env[:result]
            mount_builder.use MessageNotMounted
          end
        end
      else
        created_builder.use MessageNotCreated
      end
    end
  end
end

.action_unmountObject



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/vagrant-mount/actions/providers/virtualbox/action.rb', line 29

def self.action_unmount
  Vagrant::Action::Builder.new.tap do |builder|
    builder.use CheckVirtualbox
    builder.use Call, Created do |created_env, created_builder|
      if created_env[:result]
        created_builder.use CheckAccessible
        created_builder.use Call, Unmount do |unmount_env, unmount_builder|
          unless unmount_env[:result]
            unmount_builder.use MessageNotUnmounted
          end
        end
      else
        created_builder.use MessageNotCreated
      end
    end
  end
end