class Vagrant::Action::Builtin::EnvSet
This middleware class allows you to modify the environment hash in the middle of a middleware sequence. The new environmental data will take affect at this stage in the middleware and will persist through.
Public Class Methods
new(app, env, new_env=nil)
click to toggle source
# File lib/vagrant/action/builtin/env_set.rb, line 9 def initialize(app, env, new_env=nil) @app = app @new_env = new_env || {} end
Public Instance Methods
call(env)
click to toggle source
# File lib/vagrant/action/builtin/env_set.rb, line 14 def call(env) # Merge in the new data env.merge!(@new_env) # Carry on @app.call(env) end