Class: VagrantWindows::Config::Windows
- Inherits:
-
Object
- Object
- VagrantWindows::Config::Windows
- Defined in:
- lib/vagrant-windows/config/windows.rb
Instance Attribute Summary collapse
-
#halt_check_interval ⇒ Object
Returns the value of attribute halt_check_interval.
-
#halt_timeout ⇒ Object
Returns the value of attribute halt_timeout.
-
#set_work_network ⇒ Object
Returns the value of attribute set_work_network.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Windows
constructor
A new instance of Windows.
- #validate(machine) ⇒ Object
Constructor Details
#initialize ⇒ Windows
Returns a new instance of Windows.
11 12 13 14 15 |
# File 'lib/vagrant-windows/config/windows.rb', line 11 def initialize @halt_timeout = UNSET_VALUE @halt_check_interval = UNSET_VALUE @set_work_network = UNSET_VALUE end |
Instance Attribute Details
#halt_check_interval ⇒ Object
Returns the value of attribute halt_check_interval.
8 9 10 |
# File 'lib/vagrant-windows/config/windows.rb', line 8 def halt_check_interval @halt_check_interval end |
#halt_timeout ⇒ Object
Returns the value of attribute halt_timeout.
7 8 9 |
# File 'lib/vagrant-windows/config/windows.rb', line 7 def halt_timeout @halt_timeout end |
#set_work_network ⇒ Object
Returns the value of attribute set_work_network.
9 10 11 |
# File 'lib/vagrant-windows/config/windows.rb', line 9 def set_work_network @set_work_network end |
Instance Method Details
#finalize! ⇒ Object
27 28 29 30 31 |
# File 'lib/vagrant-windows/config/windows.rb', line 27 def finalize! @halt_timeout = 30 if @halt_timeout == UNSET_VALUE @halt_check_interval = 1 if @halt_check_interval == UNSET_VALUE @set_work_network = false if @set_work_network == UNSET_VALUE end |
#validate(machine) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/vagrant-windows/config/windows.rb', line 17 def validate(machine) errors = [] errors << "windows.halt_timeout cannot be nil." if machine.config.windows.halt_timeout.nil? errors << "windows.halt_check_interval cannot be nil." if machine.config.windows.halt_check_interval.nil? errors << "windows.set_work_network cannot be nil." if machine.config.windows.set_work_network.nil? { "Windows Guest" => errors } end |