Module: TinyAtom::URIDomain

Defined in:
lib/tinyatom/uri_domain.rb

Instance Method Summary collapse

Instance Method Details

#domainObject

Return the domain.



9
10
11
12
13
14
15
16
17
# File 'lib/tinyatom/uri_domain.rb', line 9

def domain
  if host
    begin
      parsed = PublicSuffix.parse(host.downcase)
      "#{parsed.sld}.#{parsed.tld}"
    rescue Exception
    end
  end
end