class ThriftRack::Ping
Public Class Methods
new(app)
click to toggle source
# File lib/thrift_rack/ping.rb, line 3 def initialize(app) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/thrift_rack/ping.rb, line 7 def call(env) req = Rack::Request.new(env) return 200, {'Content-Type' => 'text/plain'}, ["PONG"] if req.path == "/ping" @app.call(env) end