method

launch

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: Server
launch() 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 868
  def launch
    listeners = @server.listeners.map{|l| l.addr[2] }

    # TODO: 0.0.0.0 == any, not localhost.
    host = listeners.any?{|l| l == '0.0.0.0'} ? 'localhost' : listeners.first

    say "Launching browser to http://#{host}:#{@port}"

    system("#{@launch} http://#{host}:#{@port}")
  end
Register or log in to add new notes.