Class: VagrantPlugins::Ignition::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-ignition/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



12
13
14
15
16
17
18
19
20
# File 'lib/vagrant-ignition/config.rb', line 12

def initialize
  @enabled     = UNSET_VALUE
  @path        = UNSET_VALUE
  @config_obj  = UNSET_VALUE
  @drive_name  = UNSET_VALUE
  @drive_root  = UNSET_VALUE
  @hostname    = UNSET_VALUE
  @ip          = UNSET_VALUE
end

Instance Attribute Details

#config_objObject

Returns the value of attribute config_obj.



6
7
8
# File 'lib/vagrant-ignition/config.rb', line 6

def config_obj
  @config_obj
end

#drive_nameObject

Returns the value of attribute drive_name.



7
8
9
# File 'lib/vagrant-ignition/config.rb', line 7

def drive_name
  @drive_name
end

#drive_rootObject

Returns the value of attribute drive_root.



8
9
10
# File 'lib/vagrant-ignition/config.rb', line 8

def drive_root
  @drive_root
end

#enabledObject

Returns the value of attribute enabled.



4
5
6
# File 'lib/vagrant-ignition/config.rb', line 4

def enabled
  @enabled
end

#hostnameObject

Returns the value of attribute hostname.



9
10
11
# File 'lib/vagrant-ignition/config.rb', line 9

def hostname
  @hostname
end

#ipObject

Returns the value of attribute ip.



10
11
12
# File 'lib/vagrant-ignition/config.rb', line 10

def ip
  @ip
end

#pathObject

Returns the value of attribute path.



5
6
7
# File 'lib/vagrant-ignition/config.rb', line 5

def path
  @path
end

Instance Method Details

#finalize!Object



22
23
24
25
26
27
28
29
# File 'lib/vagrant-ignition/config.rb', line 22

def finalize!
  @enabled     = false         if @enabled     == UNSET_VALUE
  @path        = nil           if @path        == UNSET_VALUE
  @drive_name  = "config"      if @drive_name  == UNSET_VALUE
  @drive_root  = "./"          if @drive_root  == UNSET_VALUE
  @hostname    = nil           if @hostname    == UNSET_VALUE
  @ip          = nil           if @ip          == UNSET_VALUE
end