Method: Addressable::URI#tld

Defined in:
lib/addressable/uri.rb

#tldObject

Returns the top-level domain for this host.

Examples:

Addressable::URI.parse("http://www.example.co.uk").tld # => "co.uk"


1207
1208
1209
# File 'lib/addressable/uri.rb', line 1207

def tld
  PublicSuffix.parse(self.host, ignore_private: true).tld
end