Class: CSGOLytics::HTTPServer
- Inherits:
-
Object
- Object
- CSGOLytics::HTTPServer
- Defined in:
- lib/csgolytics/http_server.rb
Instance Method Summary collapse
-
#initialize(backend, port) ⇒ HTTPServer
constructor
A new instance of HTTPServer.
- #listen ⇒ Object
- #shutdown ⇒ Object
Constructor Details
#initialize(backend, port) ⇒ HTTPServer
Returns a new instance of HTTPServer.
28 29 30 31 |
# File 'lib/csgolytics/http_server.rb', line 28 def initialize(backend, port) @http = WEBrick::HTTPServer.new(:Port => port) @http.mount "/", CSGOLytics::HTTPServlet, backend end |
Instance Method Details
#listen ⇒ Object
33 34 35 |
# File 'lib/csgolytics/http_server.rb', line 33 def listen @http.start end |
#shutdown ⇒ Object
37 38 39 |
# File 'lib/csgolytics/http_server.rb', line 37 def shutdown @http.shutdown end |