Sha256: 993ddc431e0273cd22143587b46b0a3c3c2d815065bf7b8ac04bbb2743e30268

Contents?: true

Size: 527 Bytes

Versions: 1

Compression:

Stored size: 527 Bytes

Contents

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

  ATTR_NAMES = {
    :registrar_name => "Sponsoring Registrar",
    :created_on => "Created On",
    :updated_on => "Updated On",
    :expires_on => "Expires On",
    :status => "Domain Status"
  }

  def available?
    @raw =~ /No match/
  end

  # whois.nic.name uses a query in the format
  # object = name. e.g. domain = john.smith.name
  def query_string
    "domain = #{@name}\n"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jm81-whois-0.7.0 lib/whois/domain/name.rb