Class: Viaduct::Env::Set
- Inherits:
-
Object
- Object
- Viaduct::Env::Set
- Defined in:
- lib/viaduct/env.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.
6 7 8 9 |
# File 'lib/viaduct/env.rb', line 6 def initialize(app, env, =nil) @app = app = || {} end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/viaduct/env.rb', line 11 def call(env) # Merge the options that were given to us env.merge!() @app.call(env) end |