Class: Linkedin2CV::Routes::API
- Inherits:
-
Sinatra::Application
- Object
- Sinatra::Application
- Linkedin2CV::Routes::API
- Defined in:
- app/routes/api.rb
Instance Method Summary collapse
-
#checkPong(msg) ⇒ Object
Public: Keep-alive check.
Instance Method Details
#checkPong(msg) ⇒ Object
Public: Keep-alive check.
Defaults to look for for a ‘ping’ message, responds with a ‘pong’ Override this for custom behaviour.
116 117 118 119 120 121 122 |
# File 'app/routes/api.rb', line 116 def checkPong(msg) logger.debug("Checking ping pong for a ping: " + msg['message']) if (msg['message'] == 'ping') logger.debug("Ping hit!") response_obj = {'message' => 'pong'} end end |