Sha256: 2be55582b20c4a7262934c5c2ef8c71f19fd2780735a22b2fd9dc9b2137b6cf4

Contents?: true

Size: 947 Bytes

Versions: 6

Compression:

Stored size: 947 Bytes

Contents

module VagrantPlugins
  module Invade
    module Generator
      module MachinePart

        class SyncedFolder

          attr_accessor :machine_name, :synced_folder_data

          def initialize(machine_name, synced_folder_data)
            @machine_name = machine_name
            @synced_folder_data = synced_folder_data
          end

          def generate
            case @synced_folder_data['type']
            when 'vb', 'virtualbox'
              synced_folder = Builder::SyncedFolder::VirtualBox.new(@machine_name, @synced_folder_data)
            when 'nfs'
              synced_folder = Builder::SyncedFolder::NFS.new(@machine_name, @synced_folder_data)
            else
              raise StandardError, "Synced folder type unknown or not set. Please check the synced folder configuration."
            end

            synced_folder.build

            synced_folder.result
          end

        end

      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vagrant-invade-0.5.5 lib/vagrant-invade/generator/machine_part/synced_folder.rb
vagrant-invade-0.5.4 lib/vagrant-invade/generator/machine_part/synced_folder.rb
vagrant-invade-0.5.3 lib/vagrant-invade/generator/machine_part/synced_folder.rb
vagrant-invade-0.5.2 lib/vagrant-invade/generator/machine_part/synced_folder.rb
vagrant-invade-0.5.1 lib/vagrant-invade/generator/machine_part/synced_folder.rb
vagrant-invade-0.5.0 lib/vagrant-invade/generator/machine_part/synced_folder.rb