weppos/public_suffix_service — pull request #17 by razorinc (2012-03-03 01:40:37+00:00)
Title: Added trd? method

Hi, i just thought, using this gem that i need this method to verify if given a domain exist or not the subdomain.

Example:
>> require 'public_suffix'
=> true
>> a = PublicSuffix::parse("www.google.it")
=> #
>> a.trd
=> "www"
>> a.trd?
=> true
>> b = PublicSuffix::parse("google.it")
=> #
>> b.trd
=> nil
>> b.trd?
=> false