Class: Relay::Reloader

Inherits:
Object
  • Object
show all
Defined in:
lib/relay/reloader.rb

Overview

Reloads Zeitwerk-managed application code on each request in development before passing control to the downstream Rack app.

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Relay::Reloader

Parameters:



11
12
13
# File 'lib/relay/reloader.rb', line 11

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Array(Integer, Hash, #each)

Parameters:

  • env (Hash)

Returns:

  • (Array(Integer, Hash, #each))


18
19
20
21
# File 'lib/relay/reloader.rb', line 18

def call(env)
  reload!
  @app.call(env)
end