Class: URI::Generic

Inherits:
Object
  • Object
show all
Defined in:
lib/tinyatom/uri.rb

Instance Method Summary collapse

Instance Method Details

#domainObject

Add domain method to URI.



6
7
8
9
10
# File 'lib/tinyatom/uri.rb', line 6

def domain
  if (host and (d = host[/[a-z\d-]+\.[a-z]{2,}(\.[a-z]{2})?$/]))
    d.downcase
  end
end