Class: Jasmine::Server
- Inherits:
-
Object
- Object
- Jasmine::Server
- Defined in:
- lib/jasmine/server.rb
Instance Method Summary collapse
-
#initialize(port = 8888, application = nil, rack_options = nil, env = ENV) ⇒ Server
constructor
A new instance of Server.
- #start ⇒ Object
Constructor Details
#initialize(port = 8888, application = nil, rack_options = nil, env = ENV) ⇒ Server
Returns a new instance of Server.
3 4 5 6 7 8 |
# File 'lib/jasmine/server.rb', line 3 def initialize(port = 8888, application = nil, = nil, env = ENV) @port = port @application = application @rack_options = || {} @env = env end |
Instance Method Details
#start ⇒ Object
10 11 12 13 14 15 |
# File 'lib/jasmine/server.rb', line 10 def start @env['PORT'] = @port.to_s Rack::Server.start(@rack_options.merge(:Port => @port, :AccessLog => [], :app => @application)) end |