Class: VagrantVbguest::Config

Inherits:
Object
  • Object
show all
Extended by:
Attributes
Includes:
Attributes
Defined in:
lib/vagrant-vbguest/config.rb

Defined Under Namespace

Modules: Attributes

Instance Attribute Summary

Attributes included from Attributes

#installer, #iso_mount_point, #iso_upload_path

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.auto_rebootObject



15
# File 'lib/vagrant-vbguest/config.rb', line 15

def auto_reboot; @auto_reboot.nil? ? true  : @auto_reboot end

.auto_updateObject



14
# File 'lib/vagrant-vbguest/config.rb', line 14

def auto_update; @auto_update.nil? ? true  : @auto_update end

.installer_argumentsObject



18
# File 'lib/vagrant-vbguest/config.rb', line 18

def installer_arguments; @installer_arguments.nil? ? '--nox11' : @installer_arguments end

.iso_pathObject



21
22
23
24
# File 'lib/vagrant-vbguest/config.rb', line 21

def iso_path
  return nil if !@iso_path || @iso_path == :auto
  @iso_path
end

.no_installObject



16
# File 'lib/vagrant-vbguest/config.rb', line 16

def no_install;  @no_install.nil?  ? false : @no_install  end

.no_remoteObject



17
# File 'lib/vagrant-vbguest/config.rb', line 17

def no_remote;   @no_remote.nil?   ? false : @no_remote   end

.yesObject



19
# File 'lib/vagrant-vbguest/config.rb', line 19

def yes; @yes.nil? ? true : @yes end

Instance Method Details

#auto_rebootObject



30
# File 'lib/vagrant-vbguest/config.rb', line 30

def auto_reboot; @auto_reboot.nil? ? self.class.auto_reboot : @auto_reboot end

#auto_updateObject



29
# File 'lib/vagrant-vbguest/config.rb', line 29

def auto_update; @auto_update.nil? ? self.class.auto_update : @auto_update end

#installer_argumentsObject



33
# File 'lib/vagrant-vbguest/config.rb', line 33

def installer_arguments; @installer_arguments.nil? ? self.class.installer_arguments : @installer_arguments end

#iso_pathObject



36
37
38
39
# File 'lib/vagrant-vbguest/config.rb', line 36

def iso_path
  return self.class.iso_path if !@iso_path || @iso_path == :auto
  @iso_path
end

#no_installObject



31
# File 'lib/vagrant-vbguest/config.rb', line 31

def no_install;  @no_install.nil?  ? self.class.no_install  : @no_install  end

#no_remoteObject



32
# File 'lib/vagrant-vbguest/config.rb', line 32

def no_remote;   @no_remote.nil?   ? self.class.no_remote   : @no_remote   end

#to_hashObject

explicit hash, to get symbols in hash keys



42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/vagrant-vbguest/config.rb', line 42

def to_hash
  {
    :installer => installer,
    :installer_arguments => installer_arguments,
    :iso_path => iso_path,
    :iso_upload_path => iso_upload_path,
    :iso_mount_point => iso_mount_point,
    :auto_update => auto_update,
    :auto_reboot => auto_reboot,
    :no_install => no_install,
    :no_remote => no_remote,
    :yes => yes
  }
end

#yesObject



34
# File 'lib/vagrant-vbguest/config.rb', line 34

def yes; @yes.nil? ? self.class.yes : @yes end