Class: Vagrant::Action::Env::Set
- Inherits:
-
Object
- Object
- Vagrant::Action::Env::Set
- Defined in:
- lib/vagrant/action/env/set.rb
Overview
A middleware which just sets up the environment with some options which are passed to it.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env, options = nil) ⇒ Set
constructor
A new instance of Set.
Constructor Details
#initialize(app, env, options = nil) ⇒ Set
Returns a new instance of Set.
7 8 9 10 |
# File 'lib/vagrant/action/env/set.rb', line 7 def initialize(app, env, =nil) @app = app @options = || {} end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/vagrant/action/env/set.rb', line 12 def call(env) # Merge the options that were given to us env.merge!(@options) @app.call(env) end |