class Rack::Philae
Public Class Methods
new(app, prober)
click to toggle source
# File lib/rack/philae_rack.rb, line 3 def initialize(app, prober) @app = app @prober = prober end
Public Instance Methods
call(env)
click to toggle source
# File lib/rack/philae_rack.rb, line 8 def call(env) if env['PATH_INFO'] == '/_health' [200, { 'Content-type' => 'application/json' }, [@prober.check.to_json]] else @app.call(env) end end