Class: Vagrant::Config::ErrorRecorder
- Inherits:
-
Object
- Object
- Vagrant::Config::ErrorRecorder
- 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
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#add(message) ⇒ Object
Adds an error to the list of errors.
-
#initialize ⇒ ErrorRecorder
constructor
A new instance of ErrorRecorder.
Constructor Details
#initialize ⇒ ErrorRecorder
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
#errors ⇒ Object (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() @errors << end |