Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2.3.8) is shown here.
These similar methods exist in v6.1.7.7:
dispatch(options = {})
public
Start the WEBrick server with the given options, mounting the DispatchServlet at /.
Show source
def self.dispatch(options = {})
Socket.do_not_reverse_lookup = true
params = { :Port => options[:port].to_i,
:ServerType => options[:server_type],
:BindAddress => options[:ip] }
params[:MimeTypes] = options[:mime_types] if options[:mime_types]
server = WEBrick::HTTPServer.new(params)
server.mount('/', DispatchServlet, options)
trap("INT") { server.shutdown }
server.start
end