class Rack::Health
Public Class Methods
new(app, opts = {})
click to toggle source
# File lib/rack/health.rb, line 5 def initialize(app, opts = {}) @app = app @opts = opts end
Public Instance Methods
call(env)
click to toggle source
# File lib/rack/health.rb, line 10 def call(env) if env['ORIGINAL_FULLPATH'] == health_check_path [200, {}, ['{"status":"OK"}']] else @app.call env end end
health_check_path()
click to toggle source
# File lib/rack/health.rb, line 18 def health_check_path @opts[:path] end