Class: DeepHealthCheck::MiddlewareHealthCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/deep_health_check/middleware_health_check.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ MiddlewareHealthCheck

Returns a new instance of MiddlewareHealthCheck.



5
6
7
# File 'lib/deep_health_check/middleware_health_check.rb', line 5

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
12
# File 'lib/deep_health_check/middleware_health_check.rb', line 9

def call(env)
  health_check = HealthCheckBuilder.build env['PATH_INFO']
  health_check&.call || @app.call(env)
end