Class: Jets::Middleware::DefaultStack
- Inherits:
-
Object
- Object
- Jets::Middleware::DefaultStack
- Defined in:
- lib/jets/middleware/default_stack.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #build_stack ⇒ Object
-
#initialize(app, config) ⇒ DefaultStack
constructor
A new instance of DefaultStack.
Constructor Details
#initialize(app, config) ⇒ DefaultStack
Returns a new instance of DefaultStack.
4 5 6 7 |
# File 'lib/jets/middleware/default_stack.rb', line 4 def initialize(app, config) @app = app @config = config end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
3 4 5 |
# File 'lib/jets/middleware/default_stack.rb', line 3 def app @app end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/jets/middleware/default_stack.rb', line 3 def config @config end |
Instance Method Details
#build_stack ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/jets/middleware/default_stack.rb', line 9 def build_stack Stack.new do |middleware| middleware.use Rack::Runtime middleware.use Rack::MethodOverride # must come before Middleware::Local for multipart post forms to work middleware.use Jets::Controller::Middleware::Local # mimics AWS Lambda for local server only middleware.use session_store, # use session_store, session_options middleware.use Rack::Head middleware.use Rack::ConditionalGet middleware.use Rack::ETag use_webpacker(middleware) end end |