method

new

Importance_0
v2_2_9 - Show latest stable - 0 notes - Class: Server
new(gem_dirs, port, daemon, launch = nil, addresses = nil) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/server.rb, line 432
  def initialize(gem_dirs, port, daemon, launch = nil, addresses = nil)
    Gem::RDoc.load_rdoc
    Socket.do_not_reverse_lookup = true

    @gem_dirs  = Array gem_dirs
    @port      = port
    @daemon    = daemon
    @launch    = launch
    @addresses = addresses

    logger  = WEBrick::Log.new nil, WEBrick::BasicLog::FATAL
    @server = WEBrick::HTTPServer.new :DoNotListen => true, :Logger => logger

    @spec_dirs = @gem_dirs.map { |gem_dir| File.join gem_dir, 'specifications' }
    @spec_dirs.reject! { |spec_dir| !File.directory? spec_dir }

    reset_gems

    @have_rdoc_4_plus = nil
  end
Register or log in to add new notes.