Class: InertiaRails::Middleware

Inherits:
Object
  • Object
show all
Defined in:
lib/inertia_rails/middleware.rb

Defined Under Namespace

Classes: InertiaRailsRequest

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Middleware

Returns a new instance of Middleware.



5
6
7
# File 'lib/inertia_rails/middleware.rb', line 5

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
# File 'lib/inertia_rails/middleware.rb', line 9

def call(env)
  InertiaRailsRequest.new(@app, env).response
end