D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
URI
/
Generic
/
Filename :
host-i.ri
back
Copy
U:RDoc::Attr[iI" host:ETI"URI::Generic#host;TI"R;T:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"+Returns the host component of the URI.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I".URI("http://foo/bar/baz").host #=> "foo" ;T:@format0o; ; [I"0It returns nil if no host component exists.;T@o;; [I"0URI("mailto:foo@example.org").host #=> nil ;T; 0o; ; [I"4The component does not contain the port number.;T@o;; [I"3URI("http://foo:8080/bar/baz").host #=> "foo" ;T; 0o; ; [ I"=Since IPv6 addresses are wrapped with brackets in URIs, ;TI"?this method returns IPv6 addresses wrapped with brackets. ;TI"TThis form is not appropriate to pass to socket methods such as TCPSocket.open. ;TI"DIf unwrapped host names are required, use the #hostname method.;T@o;; [I"6URI("http://[::1]/bar/baz").host #=> "[::1]" ;TI"3URI("http://[::1]/bar/baz").hostname #=> "::1";T; 0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below0F@)I"URI::Generic;TcRDoc::NormalClass0