class Addressable::URI

def tld

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

Returns the top-level domain for this host.
#
def tld
  PublicSuffix.parse(self.host, ignore_private: true).tld
end