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 |
# File 'lib/vagrant/action/general/validate.rb', line 7 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 |
# File 'lib/vagrant/action/general/validate.rb', line 11 def call(env) env[:vm].config.validate!(env[:vm].env) if !env.has_key?("validate") || env["validate"] @app.call(env) end |