Module: Murlsh::URIDomain

Defined in:
lib/murlsh/uri_domain.rb

Instance Method Summary collapse

Instance Method Details

#domainObject

Return the domain.



11
12
13
14
15
16
17
18
# File 'lib/murlsh/uri_domain.rb', line 11

def domain
  if host
    Murlsh::failproof do
      parsed = PublicSuffixService.parse(host.downcase)
      "#{parsed.sld}.#{parsed.tld}"
    end
  end
end