Class: Vagrant::Action::General::Validate
- Inherits:
-
Object
- Object
- Vagrant::Action::General::Validate
- Defined in:
- lib/vagrant/action/general/validate.rb
Overview
Simply validates the configuration of the current Vagrant environment.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ Validate
constructor
A new instance of Validate.
Constructor Details
#initialize(app, env) ⇒ Validate
Returns a new instance of Validate.
7 8 9 10 |
# File 'lib/vagrant/action/general/validate.rb', line 7 def initialize(app, env) @app = app @env = env end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 |
# File 'lib/vagrant/action/general/validate.rb', line 12 def call(env) @env["config"].validate! if !@env.has_key?("validate") || @env["validate"] @app.call(@env) end |