Class: TurboBoost::Commands::ExitMiddleware
- Inherits:
-
Object
- Object
- TurboBoost::Commands::ExitMiddleware
- Defined in:
- lib/turbo_boost/commands/middlewares/exit_middleware.rb
Constant Summary collapse
- BODY_PATTERN =
/<\/\s*body/i- TURBO_FRAME_PATTERN =
/<\/\s*turbo-frame/i- TURBO_STREAM_PATTERN =
/<\/\s*turbo-stream/i- TAIL_PATTERN =
/\z/i
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ ExitMiddleware
constructor
A new instance of ExitMiddleware.
Constructor Details
#initialize(app) ⇒ ExitMiddleware
Returns a new instance of ExitMiddleware.
9 10 11 |
# File 'lib/turbo_boost/commands/middlewares/exit_middleware.rb', line 9 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/turbo_boost/commands/middlewares/exit_middleware.rb', line 13 def call(env) @params = env["turbo_boost_command_params"] response = @app.call(env) return modify!(env, response) if modify?(env) response end |