Class: Vagrant::Config::VagrantConfig

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

Instance Attribute Summary collapse

Attributes inherited from Base

#top

Instance Method Summary collapse

Methods inherited from Base

configures, #env, #instance_variables_hash, json_create, #set_options, #to_hash, #to_json

Instance Attribute Details

#dotfile_nameObject

Returns the value of attribute dotfile_name.



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

def dotfile_name
  @dotfile_name
end

#hostObject

Returns the value of attribute host.



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

def host
  @host
end

Instance Method Details

#validate(errors) ⇒ Object



9
10
11
12
13
# File 'lib/vagrant/config/vagrant.rb', line 9

def validate(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