Class: Vagrant::Butcher::Config
- Inherits:
-
Object
- Object
- Vagrant::Butcher::Config
- Defined in:
- lib/vagrant-butcher/config.rb
Instance Attribute Summary collapse
-
#cache_dir ⇒ Object
readonly
Returns the value of attribute cache_dir.
-
#client_key ⇒ Object
Returns the value of attribute client_key.
-
#client_name ⇒ Object
Returns the value of attribute client_name.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#guest_key_path ⇒ Object
Returns the value of attribute guest_key_path.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#retries ⇒ Object
Returns the value of attribute retries.
-
#retry_interval ⇒ Object
Returns the value of attribute retry_interval.
-
#verify_ssl ⇒ Object
Returns the value of attribute verify_ssl.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/vagrant-butcher/config.rb', line 14 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_dir ⇒ Object (readonly)
Returns the value of attribute cache_dir.
6 7 8 |
# File 'lib/vagrant-butcher/config.rb', line 6 def cache_dir @cache_dir end |
#client_key ⇒ Object
Returns the value of attribute client_key.
12 13 14 |
# File 'lib/vagrant-butcher/config.rb', line 12 def client_key @client_key end |
#client_name ⇒ Object
Returns the value of attribute client_name.
11 12 13 |
# File 'lib/vagrant-butcher/config.rb', line 11 def client_name @client_name end |
#enabled ⇒ Object
Returns the value of attribute enabled.
4 5 6 |
# File 'lib/vagrant-butcher/config.rb', line 4 def enabled @enabled end |
#guest_key_path ⇒ Object
Returns the value of attribute guest_key_path.
5 6 7 |
# File 'lib/vagrant-butcher/config.rb', line 5 def guest_key_path @guest_key_path end |
#proxy ⇒ Object
Returns the value of attribute proxy.
10 11 12 |
# File 'lib/vagrant-butcher/config.rb', line 10 def proxy @proxy end |
#retries ⇒ Object
Returns the value of attribute retries.
8 9 10 |
# File 'lib/vagrant-butcher/config.rb', line 8 def retries @retries end |
#retry_interval ⇒ Object
Returns the value of attribute retry_interval.
9 10 11 |
# File 'lib/vagrant-butcher/config.rb', line 9 def retry_interval @retry_interval end |
#verify_ssl ⇒ Object
Returns the value of attribute verify_ssl.
7 8 9 |
# File 'lib/vagrant-butcher/config.rb', line 7 def verify_ssl @verify_ssl end |
Instance Method Details
#finalize! ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/vagrant-butcher/config.rb', line 27 def finalize! @enabled = true if @enabled == UNSET_VALUE @guest_key_path = '/etc/chef/client.pem' 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 |