Class: VagrantPlugins::ManagedServers::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::ManagedServers::Config
- Defined in:
- lib/vagrant-managed-servers/config.rb
Instance Attribute Summary collapse
-
#server ⇒ String
The IP address or hostname of the managed server.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #validate(machine) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
12 13 14 |
# File 'lib/vagrant-managed-servers/config.rb', line 12 def initialize() @server = UNSET_VALUE end |
Instance Attribute Details
#server ⇒ String
The IP address or hostname of the managed server.
10 11 12 |
# File 'lib/vagrant-managed-servers/config.rb', line 10 def server @server end |
Instance Method Details
#finalize! ⇒ Object
16 17 18 19 |
# File 'lib/vagrant-managed-servers/config.rb', line 16 def finalize! # server must be nil, since we can't default that @server = nil if @server == UNSET_VALUE end |
#validate(machine) ⇒ Object
21 22 23 24 25 |
# File 'lib/vagrant-managed-servers/config.rb', line 21 def validate(machine) errors = _detected_errors errors << I18n.t("vagrant_managed_servers.config.server_required") if @server.nil? { "ManagedServers Provider" => errors } end |