Class: Whois::Parser::Contact

Inherits:
Object
  • Object
show all
Defined in:
lib/whois/parser/contact.rb

Overview

Holds the details of a contact extracted from the WHOIS response.

A contact is composed by the several attributes, accessible through corresponding getter / setter methods.

Please note that a response is not required to provide all the attributes. When an attribute is not available, the corresponding value is set to nil.

Constant Summary collapse

TYPE_REGISTRANT =
1
TYPE_ADMINISTRATIVE =
2
TYPE_TECHNICAL =
3

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#addressString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def address
  @address
end

#cityString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def city
  @city
end

#countryString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def country
  @country
end

#country_codeString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def country_code
  @country_code
end

#created_onTime



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def created_on
  @created_on
end

#emailString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def email
  @email
end

#faxString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def fax
  @fax
end

#idString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def id
  @id
end

#nameString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def name
  @name
end

#organizationString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def organization
  @organization
end

#phoneString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def phone
  @phone
end

#stateString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def state
  @state
end

#typeString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def type
  @type
end

#updated_onTime



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def updated_on
  @updated_on
end

#urlString

      1. to the contact form



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def url
  @url
end

#zipString



33
34
35
# File 'lib/whois/parser/contact.rb', line 33

def zip
  @zip
end

Class Method Details

.const_missing(name) ⇒ Object



43
44
45
46
47
48
49
50
51
# File 'lib/whois/parser/contact.rb', line 43

def self.const_missing(name)
  case name
  when :TYPE_ADMIN
    Whois.deprecate("Whois::Record::Contact::TYPE_ADMIN is now Whois::Record::Contact::TYPE_ADMINISTRATIVE")
    const_set(name, TYPE_ADMINISTRATIVE)
  else
    super
  end
end