Class: Vagrant::Config::Windows
- Inherits:
-
Base
- Object
- Base
- Vagrant::Config::Windows
- Defined in:
- lib/vagrant-windows/config/windows.rb
Instance Attribute Summary collapse
-
#device ⇒ Object
Returns the value of attribute device.
-
#halt_check_interval ⇒ Object
Returns the value of attribute halt_check_interval.
-
#halt_timeout ⇒ Object
Returns the value of attribute halt_timeout.
-
#winrm_password ⇒ Object
Returns the value of attribute winrm_password.
-
#winrm_user ⇒ Object
Returns the value of attribute winrm_user.
Instance Method Summary collapse
-
#initialize ⇒ Windows
constructor
A new instance of Windows.
- #validate(env, errors) ⇒ Object
Constructor Details
#initialize ⇒ Windows
Returns a new instance of Windows.
10 11 12 13 14 15 16 |
# File 'lib/vagrant-windows/config/windows.rb', line 10 def initialize @winrm_user = 'vagrant' @winrm_password = 'vagrant' @halt_timeout = 30 @halt_check_interval = 1 @device = "e1000g" end |
Instance Attribute Details
#device ⇒ Object
Returns the value of attribute device.
8 9 10 |
# File 'lib/vagrant-windows/config/windows.rb', line 8 def device @device end |
#halt_check_interval ⇒ Object
Returns the value of attribute halt_check_interval.
7 8 9 |
# File 'lib/vagrant-windows/config/windows.rb', line 7 def halt_check_interval @halt_check_interval end |
#halt_timeout ⇒ Object
Returns the value of attribute halt_timeout.
6 7 8 |
# File 'lib/vagrant-windows/config/windows.rb', line 6 def halt_timeout @halt_timeout end |
#winrm_password ⇒ Object
Returns the value of attribute winrm_password.
5 6 7 |
# File 'lib/vagrant-windows/config/windows.rb', line 5 def winrm_password @winrm_password end |
#winrm_user ⇒ Object
Returns the value of attribute winrm_user.
4 5 6 |
# File 'lib/vagrant-windows/config/windows.rb', line 4 def winrm_user @winrm_user end |
Instance Method Details
#validate(env, errors) ⇒ Object
18 19 20 21 22 |
# File 'lib/vagrant-windows/config/windows.rb', line 18 def validate(env, errors) [ :winrm_user, :winrm_password].each do |field| errors.add(I18n.t("vagrant.config.common.error_empty", :field => field)) if !instance_variable_get("@#{field}".to_sym) end end |