Class: VagrantSpec::Config::Base
- Inherits:
-
Object
- Object
- VagrantSpec::Config::Base
- Defined in:
- lib/vagrant_spec/config/base.rb
Overview
This class handles the configuration options in the Vagrantfile
Constant Summary collapse
- DEFAULTS =
VagrantSpec::Config::DEFAULTS
Instance Attribute Summary collapse
-
#ansible_inventory ⇒ Object
Returns the value of attribute ansible_inventory.
-
#directory ⇒ Object
Returns the value of attribute directory.
-
#generate_machine_data ⇒ Object
Returns the value of attribute generate_machine_data.
-
#test_plan ⇒ Object
Returns the value of attribute test_plan.
Instance Method Summary collapse
- #final_ansible_inventory ⇒ Object
- #final_directory ⇒ Object
- #final_generate_machine_data ⇒ Object
- #final_test_plan ⇒ Object
- #finalize! ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
16 17 18 19 20 21 |
# File 'lib/vagrant_spec/config/base.rb', line 16 def initialize @directory = UNSET_VALUE @ansible_inventory = UNSET_VALUE @test_plan = UNSET_VALUE @generate_machine_data = UNSET_VALUE end |
Instance Attribute Details
#ansible_inventory ⇒ Object
Returns the value of attribute ansible_inventory.
12 13 14 |
# File 'lib/vagrant_spec/config/base.rb', line 12 def ansible_inventory @ansible_inventory end |
#directory ⇒ Object
Returns the value of attribute directory.
11 12 13 |
# File 'lib/vagrant_spec/config/base.rb', line 11 def directory @directory end |
#generate_machine_data ⇒ Object
Returns the value of attribute generate_machine_data.
14 15 16 |
# File 'lib/vagrant_spec/config/base.rb', line 14 def generate_machine_data @generate_machine_data end |
#test_plan ⇒ Object
Returns the value of attribute test_plan.
13 14 15 |
# File 'lib/vagrant_spec/config/base.rb', line 13 def test_plan @test_plan end |
Instance Method Details
#final_ansible_inventory ⇒ Object
27 28 29 30 31 |
# File 'lib/vagrant_spec/config/base.rb', line 27 def final_ansible_inventory if @ansible_inventory == UNSET_VALUE @ansible_inventory = DEFAULTS['ansible_inventory'] end end |
#final_directory ⇒ Object
23 24 25 |
# File 'lib/vagrant_spec/config/base.rb', line 23 def final_directory @directory = DEFAULTS['directory'] if @directory == UNSET_VALUE end |
#final_generate_machine_data ⇒ Object
37 38 39 40 41 |
# File 'lib/vagrant_spec/config/base.rb', line 37 def final_generate_machine_data if @generate_machine_data == UNSET_VALUE @generate_machine_data = DEFAULTS['generate_machine_data'] end end |
#final_test_plan ⇒ Object
33 34 35 |
# File 'lib/vagrant_spec/config/base.rb', line 33 def final_test_plan @test_plan = DEFAULTS['test_plan'] if @test_plan == UNSET_VALUE end |
#finalize! ⇒ Object
43 44 45 46 47 48 |
# File 'lib/vagrant_spec/config/base.rb', line 43 def finalize! final_directory final_ansible_inventory final_test_plan final_generate_machine_data end |