Flowdock
method

hostname

Importance_1
v1_9_3_125 - 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 same as URI::Generic#host except brackets for IPv6 (andn future IP) addresses are removed.

u = URI(“http://[::1]/bar”) p u.hostname #=> “::1” p u.host #=> “[::1]”

Show source
Register or log in to add new notes.