README.md in jm81-whois-0.6.0 vs README.md in jm81-whois-0.7.0
- old
+ new
@@ -7,10 +7,13 @@
sudo gem install jm81-whois
##Example
+ require 'whois'
+ domain = Whois::Domain.new('example.com')
+
domain.name #=> "example.com"
domain.expires_on #=> 2011-08-13 <Date>
domain.created_on #=> 1995-08-14 <Date>
domain.updated_on #=> 2004-03-26 <Date>
domain.database_updated_at #=> Mon Sep 28 23:44:55 UTC 2009 <Time>
@@ -25,15 +28,15 @@
domain.raw # Raw whois information
domain.to_s # Key value pairs of anything that looks like an attribute.
# Especially useful for non-API information, such as registrant
# data.
-
+
##Code layout
Since pretty much every TLD has a different whois format, the various classes
-(which inherit from Domain::Base) in the Domain module (files in domain folder)
+(which inherit from Domain::Base) in the Domain module (files in domain folder)
have the following:
- HOST constant: the host name of the whois server
- ATTR_MATCH constant: A regular expression with two groups, that matches each
key value pair line in the raw whois data. The first group is the key, the
@@ -48,10 +51,10 @@
insufficient (particular likely for lists of values, such as *status* and
*nameservers*.
##Note on Tests
-Tests are against actual whois data and thus are somewhat brittle, especially
+Tests are against actual whois data and thus are somewhat brittle, especially
*expires_at* and *updated_at*.
##TODO
- Whois information for: