Over a million developers have joined DZone.

Validating A TLD In Ruby1.9.1

·
sudo gem1.9.1 install addressable
Successfully installed addressable-2.1.1
1 gem installed
Installing ri documentation for addressable-2.1.1...
Installing RDoc documentation for addressable-2.1.1...
sudo gem1.9.1 install alexrabarts-tld -s http://gems.github.com

Successfully installed alexrabarts-iso_country_codes-0.2.2
Successfully installed alexrabarts-tld-0.6.0
2 gems installed
Installing ri documentation for alexrabarts-iso_country_codes-0.2.2...
Installing ri documentation for alexrabarts-tld-0.6.0...
Updating class cache with 2187 classes...
Installing RDoc documentation for alexrabarts-iso_country_codes-0.2.2...
Installing RDoc documentation for alexrabarts-tld-0.6.0...
require 'tld' TLD.find('foo.com.au').name #=> "Australia" TLD.find('is.gd').name #=> "Grenada" TLD.find('deli.cio.us').name #=> "United States" Resources: - Validate a TLD with Ruby [dzone.com]
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}