Sha256: 8636eb0d02061be0fea2c64b0d27dd30a8e8ff7ea3ba9c3809e084943d0a490c

Contents?: true

Size: 820 Bytes

Versions: 2

Compression:

Stored size: 820 Bytes

Contents

class Whois::Domain::Educause < Whois::Domain::Base
  HOST = "whois.educause.edu"
  ATTR_MATCH = /^([^:]+):\s+(.*)$/
  responds_to :edu

  ATTR_NAMES = {
    :created_on => "Domain record activated",
    :updated_on => "Domain record last updated",
    :expires_on => "Domain expires"
  }
  
  # Educause is the only registrar for .edu
  def registrar_name
    "Educause"
  end
  
  def available?
    @raw =~ /^No Match/
  end
  
  def name_servers
    found = false
    ns_ary = []
    @raw.each_line do |l|
      if l =~ /^Name Servers:/
        found = true
      elsif found && l =~ /^\s+(\S+)/
        ns_ary << $1
      elsif found && l.strip.empty?
        return ns_ary
      end
    end
    ns_ary
  end
  
  def ns
    name_servers
  end
  
  def register_url
    "http://www.educause.edu/edudomain"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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