Class: Vagrant::Config::VagrantConfig
- Defined in:
- lib/vagrant/config/vagrant.rb
Instance Attribute Summary collapse
-
#dotfile_name ⇒ Object
Returns the value of attribute dotfile_name.
-
#host ⇒ Object
Returns the value of attribute host.
Instance Method Summary collapse
Methods inherited from Base
#instance_variables_hash, json_create, #merge, #set_options, #to_hash, #to_json
Instance Attribute Details
#dotfile_name ⇒ Object
Returns the value of attribute dotfile_name.
4 5 6 |
# File 'lib/vagrant/config/vagrant.rb', line 4 def dotfile_name @dotfile_name end |
#host ⇒ Object
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 |