Class: Itiscold::WebServer::InfoServlet
- Inherits:
-
TTYServlet
- Object
- WEBrick::HTTPServlet::AbstractServlet
- TTYServlet
- Itiscold::WebServer::InfoServlet
- Defined in:
- lib/itiscold.rb
Instance Method Summary collapse
Methods inherited from TTYServlet
Constructor Details
This class inherits a constructor from Itiscold::WebServer::TTYServlet
Instance Method Details
#do_GET(request, response) ⇒ Object
335 336 337 338 339 340 341 342 |
# File 'lib/itiscold.rb', line 335 def do_GET request, response response.status = 200 response['Content-Type'] = 'text/json' @mutex.synchronize do json = JSON.dump(@tty.device_info.to_h) response.body = json end end |