Class: Whois::Domain::Educause

Inherits:
Base
  • Object
show all
Defined in:
lib/whois/domain/educause.rb

Constant Summary collapse

HOST =
"whois.educause.edu"
ATTR_MATCH =
/^([^:]+):\s+(.*)$/
ATTR_NAMES =
{
  :created_on => "Domain record activated",
  :updated_on => "Domain record last updated",
  :expires_on => "Domain expires"
}

Instance Attribute Summary

Attributes inherited from Base

#name, #raw

Instance Method Summary collapse

Methods inherited from Base

#administrative_id, #attrs, #created_on, #database_updated_at, #expired?, #expires_on, #host, #initialize, #lookup_restricted?, #registered?, #registrant_id, responds_to, #status, #to_s, #updated_on, #whois_server

Constructor Details

This class inherits a constructor from Whois::Domain::Base

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/whois/domain/educause.rb', line 17

def available?
  @raw =~ /^No Match/
end

#name_serversObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/whois/domain/educause.rb', line 21

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

#nsObject



36
37
38
# File 'lib/whois/domain/educause.rb', line 36

def ns
  name_servers
end

#register_urlObject



40
41
42
# File 'lib/whois/domain/educause.rb', line 40

def register_url
  "http://www.educause.edu/edudomain"
end

#registrar_nameObject

Educause is the only registrar for .edu



13
14
15
# File 'lib/whois/domain/educause.rb', line 13

def registrar_name
  "Educause"
end