Class: VagrantWizard::Config
- Inherits:
-
Object
- Object
- VagrantWizard::Config
- Defined in:
- lib/vagrant-wizard/config.rb
Instance Attribute Summary collapse
-
#config_path ⇒ Object
Returns the value of attribute config_path.
-
#defaults_path ⇒ Object
Returns the value of attribute defaults_path.
-
#presets_dir_path ⇒ Object
Returns the value of attribute presets_dir_path.
-
#prompt_overwrite ⇒ Object
Returns the value of attribute prompt_overwrite.
-
#prompt_presets ⇒ Object
Returns the value of attribute prompt_presets.
-
#wizard_path ⇒ Object
Returns the value of attribute wizard_path.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
12 13 14 15 16 17 18 19 |
# File 'lib/vagrant-wizard/config.rb', line 12 def initialize @wizard_path = UNSET_VALUE @defaults_path = UNSET_VALUE @config_path = UNSET_VALUE @prompt_presets = UNSET_VALUE @presets_dir_path = UNSET_VALUE @prompt_overwrite = UNSET_VALUE end |
Instance Attribute Details
#config_path ⇒ Object
Returns the value of attribute config_path.
7 8 9 |
# File 'lib/vagrant-wizard/config.rb', line 7 def config_path @config_path end |
#defaults_path ⇒ Object
Returns the value of attribute defaults_path.
6 7 8 |
# File 'lib/vagrant-wizard/config.rb', line 6 def defaults_path @defaults_path end |
#presets_dir_path ⇒ Object
Returns the value of attribute presets_dir_path.
9 10 11 |
# File 'lib/vagrant-wizard/config.rb', line 9 def presets_dir_path @presets_dir_path end |
#prompt_overwrite ⇒ Object
Returns the value of attribute prompt_overwrite.
10 11 12 |
# File 'lib/vagrant-wizard/config.rb', line 10 def prompt_overwrite @prompt_overwrite end |
#prompt_presets ⇒ Object
Returns the value of attribute prompt_presets.
8 9 10 |
# File 'lib/vagrant-wizard/config.rb', line 8 def prompt_presets @prompt_presets end |
#wizard_path ⇒ Object
Returns the value of attribute wizard_path.
5 6 7 |
# File 'lib/vagrant-wizard/config.rb', line 5 def wizard_path @wizard_path end |
Instance Method Details
#finalize! ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/vagrant-wizard/config.rb', line 21 def finalize! @wizard_path = './config.wizard.yml' if @wizard_path == UNSET_VALUE @defaults_path = './config.defaults.yml' if @defaults_path == UNSET_VALUE @config_path = './config.yml' if @config_path == UNSET_VALUE @prompt_presets = true if @prompt_presets == UNSET_VALUE @presets_dir_path = './wizard-presets' if @presets_dir_path == UNSET_VALUE @prompt_overwrite = true if @prompt_overwrite == UNSET_VALUE end |