Class: Vagrant::Config::ErrorRecorder

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

Overview

A class which is passed into the various Base#validate methods and can be used as a helper to add error messages about a single config class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeErrorRecorder

Returns a new instance of ErrorRecorder.



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

def initialize
  @errors = []
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



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

def errors
  @errors
end

Instance Method Details

#add(message) ⇒ Object

Adds an error to the list of errors.



14
15
16
# File 'lib/vagrant/config/error_recorder.rb', line 14

def add(message)
  @errors << message
end