Method: HTTP::URI#host

Defined in:
lib/http/uri.rb

#hostString?

Host, either a domain name or IP address

Examples:

uri.host # => "example.com"

Returns:

  • (String, nil)

    The host of the URI



48
49
50
# File 'lib/http/uri.rb', line 48

def host
  @host
end