Sha256: 6353953e1bee98251b07dfffcf9775de24358257df3ad0a66024f06d1707c0f9

Contents?: true

Size: 1003 Bytes

Versions: 10

Compression:

Stored size: 1003 Bytes

Contents

module VagrantPlugins
  module Invade
    module Generator
      module Section

        class Plugin

          attr_accessor :machine_name, :ui, :type, :plugin_data

          def initialize(machine_name, ui, type, plugin_data)
            @machine_name = machine_name
            @ui = ui
            @type = type
            @plugin_data = plugin_data
          end

          def generate
            case @type
            when 'hostmanager'
              plugin = Builder::Plugin::HostManager.new(@machine_name, @ui, @plugin_data)
            when 'winnfsd'
              plugin = Builder::Plugin::WinNFSd.new(@machine_name, @ui, @plugin_data)
            when 'r10k'
              plugin = Builder::Plugin::R10k.new(@machine_name, @ui, @plugin_data)
            else
              raise StandardError, "Plugin unknown or not set. Please check the plugin configuration."
            end

            plugin.build

            plugin.result
          end

        end

      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vagrant-invade-0.4.8 lib/vagrant-invade/generator/section/plugin.rb
vagrant-invade-0.4.7 lib/vagrant-invade/generator/section/plugin.rb
vagrant-invade-0.4.6 lib/vagrant-invade/generator/section/plugin.rb
vagrant-invade-0.4.5 lib/vagrant-invade/generator/section/plugin.rb
vagrant-invade-0.4.4 lib/vagrant-invade/generator/section/plugin.rb
vagrant-invade-0.4.3 lib/vagrant-invade/generator/section/plugin.rb
vagrant-invade-0.4.2 lib/vagrant-invade/generator/section/plugin.rb
vagrant-invade-0.4.1 lib/vagrant-invade/generator/section/plugin.rb
vagrant-invade-0.4.0 lib/vagrant-invade/generator/section/plugin.rb
vagrant-invade-0.4.0.pre.alpha lib/vagrant-invade/generator/section/plugin.rb