Class: Vagrant::Butcher::Config

Inherits:
Object
  • Object
show all
Includes:
Helpers::Guest
Defined in:
lib/vagrant-butcher/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers::Guest

#get_guest_key_path, #windows?

Constructor Details

#initializeConfig

Returns a new instance of Config.



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/vagrant-butcher/config.rb', line 16

def initialize
  super
  @enabled = UNSET_VALUE
  @guest_key_path = UNSET_VALUE
  @cache_dir = ".vagrant/butcher"
  @verify_ssl = UNSET_VALUE
  @retries = UNSET_VALUE
  @retry_interval = UNSET_VALUE
  @proxy = UNSET_VALUE
  @client_name = UNSET_VALUE
  @client_key = UNSET_VALUE
end

Instance Attribute Details

#cache_dirObject (readonly)

Returns the value of attribute cache_dir.



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

def cache_dir
  @cache_dir
end

#client_keyObject

Returns the value of attribute client_key.



14
15
16
# File 'lib/vagrant-butcher/config.rb', line 14

def client_key
  @client_key
end

#client_nameObject

Returns the value of attribute client_name.



13
14
15
# File 'lib/vagrant-butcher/config.rb', line 13

def client_name
  @client_name
end

#enabledObject

Returns the value of attribute enabled.



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

def enabled
  @enabled
end

#guest_key_pathObject

Returns the value of attribute guest_key_path.



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

def guest_key_path
  @guest_key_path
end

#proxyObject

Returns the value of attribute proxy.



12
13
14
# File 'lib/vagrant-butcher/config.rb', line 12

def proxy
  @proxy
end

#retriesObject

Returns the value of attribute retries.



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

def retries
  @retries
end

#retry_intervalObject

Returns the value of attribute retry_interval.



11
12
13
# File 'lib/vagrant-butcher/config.rb', line 11

def retry_interval
  @retry_interval
end

#verify_sslObject

Returns the value of attribute verify_ssl.



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

def verify_ssl
  @verify_ssl
end

Instance Method Details

#finalize!Object



29
30
31
32
33
34
35
36
37
38
# File 'lib/vagrant-butcher/config.rb', line 29

def finalize!
  @enabled = true if @enabled == UNSET_VALUE
  @guest_key_path = :DEFAULT if @guest_key_path == UNSET_VALUE
  @verify_ssl = true if @verify_ssl == UNSET_VALUE
  @retries = 0 if @retries == UNSET_VALUE
  @retry_interval = 0 if @retry_interval == UNSET_VALUE
  @proxy = nil if @proxy == UNSET_VALUE
  @client_name = nil if @client_name == UNSET_VALUE
  @client_key = nil if @client_key == UNSET_VALUE
end