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.
-
#test_plan ⇒ Object
Returns the value of attribute test_plan.
Instance Method Summary collapse
- #final_ansible_inventory ⇒ Object
- #final_directory ⇒ 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.
15 16 17 18 19 |
# File 'lib/vagrant_spec/config/base.rb', line 15 def initialize @directory = UNSET_VALUE @ansible_inventory = UNSET_VALUE @test_plan = 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 |
#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
25 26 27 28 29 |
# File 'lib/vagrant_spec/config/base.rb', line 25 def final_ansible_inventory if @ansible_inventory == UNSET_VALUE @ansible_inventory = DEFAULTS['ansible_inventory'] end end |
#final_directory ⇒ Object
21 22 23 |
# File 'lib/vagrant_spec/config/base.rb', line 21 def final_directory @directory = DEFAULTS['directory'] if @directory == UNSET_VALUE end |
#final_test_plan ⇒ Object
31 32 33 |
# File 'lib/vagrant_spec/config/base.rb', line 31 def final_test_plan @test_plan = DEFAULTS['test_plan'] if @test_plan == UNSET_VALUE end |
#finalize! ⇒ Object
35 36 37 38 39 |
# File 'lib/vagrant_spec/config/base.rb', line 35 def finalize! final_directory final_ansible_inventory final_test_plan end |