Class: Vagrant::Config::VagrantConfig

Inherits:
Base
  • Object
show all
Defined in:
lib/vagrant/config/vagrant.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#instance_variables_hash, json_create, #merge, #set_options, #to_hash, #to_json

Instance Attribute Details

#dotfile_nameObject

Returns the value of attribute dotfile_name.



4
5
6
# File 'lib/vagrant/config/vagrant.rb', line 4

def dotfile_name
  @dotfile_name
end

#hostObject

Returns the value of attribute host.



5
6
7
# File 'lib/vagrant/config/vagrant.rb', line 5

def host
  @host
end

Instance Method Details

#validate(env, errors) ⇒ Object



7
8
9
10
11
# File 'lib/vagrant/config/vagrant.rb', line 7

def validate(env, errors)
  [:dotfile_name, :host].each do |field|
    errors.add(I18n.t("vagrant.config.common.error_empty", :field => field)) if !instance_variable_get("@#{field}".to_sym)
  end
end