Sha256: 51710e79f84919cfd3a1d13bfc9807c0a2ea3c4b55ce4c08b244291f61c27b79

Contents?: true

Size: 1004 Bytes

Versions: 14

Compression:

Stored size: 1004 Bytes

Contents

# @see http://docs.vagrantup.com/v2/virtualbox/configuration.html
class ConfigBuilder::Model::Provider::Virtualbox < ConfigBuilder::Model::Base

  # @!attribute [rw] name
  #   @return [String] The name of the created VM in the Virtualbox GUI
  def_model_attribute :name

  # @!attribute [rw] customize
  #   @return [Array<String>] A list of customize arguments to use upon VM instantiation.
  def_model_attribute :customize

  # @!attribute [rw] gui
  #   @return [Boolean] Whether the GUI should be launched when the VM is created
  def_model_attribute :gui

  def initialize
    @defaults = {:customize => []}
  end

  def to_proc
    Proc.new do |vm_config|
      vm_config.provider 'virtualbox' do |vb_config|
        with_attr(:name) { |val| vb_config.name = val }

        attr(:customize).each do |cmd|
          vb_config.customize cmd
        end

        with_attr(:gui) { |val| vb_config.gui = val }
      end
    end
  end

  ConfigBuilder::Model::Provider.register('virtualbox', self)
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
vagrant-config_builder-0.15.1 lib/config_builder/model/provider/virtualbox.rb
vagrant-config_builder-0.15.0 lib/config_builder/model/provider/virtualbox.rb
vagrant-config_builder-0.14.0 lib/config_builder/model/provider/virtualbox.rb
vagrant-config_builder-0.13.0 lib/config_builder/model/provider/virtualbox.rb
vagrant-masonry-0.13.0 lib/config_builder/model/provider/virtualbox.rb
vagrant-config_builder-0.12.0 lib/config_builder/model/provider/virtualbox.rb
vagrant-config_builder-0.11.0 lib/config_builder/model/provider/virtualbox.rb
vagrant-config_builder-0.10.1 lib/config_builder/model/provider/virtualbox.rb
vagrant-config_builder-0.10.0 lib/config_builder/model/provider/virtualbox.rb
vagrant-config_builder-0.9.0 lib/config_builder/model/provider/virtualbox.rb
vagrant-config_builder-0.8.0 lib/config_builder/model/provider/virtualbox.rb
vagrant-config_builder-0.7.1 lib/config_builder/model/provider/virtualbox.rb
vagrant-config_builder-0.7.0 lib/config_builder/model/provider/virtualbox.rb
vagrant-config_builder-0.6.0 lib/config_builder/model/provider/virtualbox.rb