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
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