Flowdock
method

hostname

Importance_1
v2_6_3 - Show latest stable - 0 notes - Class: URI::Generic
hostname() public

Extract the host part of the URI and unwrap brackets for IPv6 addresses.

This method is the same as URI::Generic#host except brackets for IPv6 (and future IP) addresses are removed.

uri = URI("http://[::1]/bar")
uri.hostname      #=> "::1"
uri.host          #=> "[::1]"
Show source
Register or log in to add new notes.