Class: Nonnative::HTTPServer

Inherits:
Server
  • Object
show all
Defined in:
lib/nonnative/http_server.rb

Defined Under Namespace

Classes: Application

Instance Attribute Summary

Attributes inherited from Server

#port

Instance Method Summary collapse

Methods inherited from Server

#name, #start, #stop

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
# File 'lib/nonnative/http_server.rb', line 12

def configure(http); end

#perform_start ⇒ Object



14
15
16
# File 'lib/nonnative/http_server.rb', line 14

def perform_start
  Application.start!
end

#perform_stop ⇒ Object



18
19
20
# File 'lib/nonnative/http_server.rb', line 18

def perform_stop
  Application.stop!
end