Class: Nonnative::HTTPServer
- Defined in:
- lib/nonnative/http_server.rb
Defined Under Namespace
Classes: Application
Instance Attribute Summary
Attributes inherited from Server
Instance Method Summary collapse
- #configure(http) ⇒ Object
-
#initialize(port) ⇒ HTTPServer
constructor
A new instance of HTTPServer.
- #perform_start ⇒ Object
- #perform_stop ⇒ Object
Methods inherited from Server
Constructor Details
#initialize(port) ⇒ HTTPServer
Returns a new instance of HTTPServer.
5 6 7 8 9 10 |
# File 'lib/nonnative/http_server.rb', line 5 def initialize(port) Application.set :port, port configure Application super port end |
Instance Method Details
#configure(http) ⇒ Object
12 13 14 |
# File 'lib/nonnative/http_server.rb', line 12 def configure(http) # Classes will add configuration end |
#perform_start ⇒ Object
16 17 18 |
# File 'lib/nonnative/http_server.rb', line 16 def perform_start Application.start! end |
#perform_stop ⇒ Object
20 21 22 |
# File 'lib/nonnative/http_server.rb', line 20 def perform_stop Application.stop! end |