Class: Vagrant::Action::General::Validate

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant/action/general/validate.rb

Overview

Simply validates the configuration of the current Vagrant environment.

Instance Method Summary collapse

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