weppos / publicsuffix-ruby

Domain name parser for Ruby based on the Public Suffix List.
https://simonecarletti.com/code/publicsuffix
MIT License
620 stars 109 forks source link

Enumerable list of valid TLDs? #54

Closed craibuc closed 10 years ago

craibuc commented 10 years ago

Is there a way to get the list of the current of the top-level domains?

 require 'public_suffix"
 tld = PublicSuffix:List.all()
 tld.each { |t| puts t }

I'm interested in domains like .es, .us, .info, not co.uk.

weppos commented 10 years ago
PublicSuffix::List.default.indexes.keys