Sha256: c186978269dd04feefbebc77d7e6352812fdd03e28d2485d09d355c29c3543c6

Contents?: true

Size: 880 Bytes

Versions: 3

Compression:

Stored size: 880 Bytes

Contents

class Whois::Domain::Neustar < Whois::Domain::Base
  ATTR_MATCH = /^([^:]+):\s{2,}(.*)$/
  responds_to :biz, :us, :travel

  ATTR_NAMES = {
    :registrar_name => "Sponsoring Registrar",
    :created_on => "Domain Registration Date",
    :updated_on => "Domain Last Updated Date",
    :expires_on => "Domain Expiration Date",
    :status => "Domain Status"
  }

  def host
    case @name.match(/.*\.([^\.]+)$/)[1]
    when 'biz' then 'whois.biz'
    when 'us'  then 'whois.nic.us'
    when 'travel' then 'whois.nic.travel'
    end
  end

  def database_updated_at
    if(@raw =~ /Whois database was last updated on: ([^<]*)/)
      Time.parse($1)
    end
  end
  
  def available?
    @raw =~ /Not found:/
  end
  
  def register_url
    if @name.match(/.*\.([^\.]+)$/)[1] == "travel"
      "http://www.travel.travel/authenticationframe.htm"
    else
      super
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jm81-whois-0.7.0 lib/whois/domain/neustar.rb
jm81-whois-0.6.0 lib/whois/domain/neustar.rb
jm81-whois-0.5.0 lib/whois/domain/neustar.rb