Method: Addressable::URI#hostname
- Defined in:
- lib/addressable/uri.rb
#hostname ⇒ String
This method is same as URI::Generic#host except brackets for IPv6 (and ‘IPvFuture’) addresses are removed.
1178 1179 1180 1181 |
# File 'lib/addressable/uri.rb', line 1178 def hostname v = self.host /\A\[(.*)\]\z/ =~ v ? $1 : v end |