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

Returns the current value of address.

Returns:

  • (String)

    the current value of address



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

def address
  @address
end

#cityString

Returns the current value of city.

Returns:

  • (String)

    the current value of city



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

def city
  @city
end

#countryString

Returns the current value of country.

Returns:

  • (String)

    the current value of country



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

def country
  @country
end

#country_codeString

Returns the current value of country_code.

Returns:

  • (String)

    the current value of country_code



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

def country_code
  @country_code
end

#created_onTime

Returns the current value of created_on.

Returns:

  • (Time)

    the current value of created_on



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

def created_on
  @created_on
end

#emailString

Returns the current value of email.

Returns:

  • (String)

    the current value of email



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

def email
  @email
end

#faxString

Returns the current value of fax.

Returns:

  • (String)

    the current value of fax



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

def fax
  @fax
end

#idString

Returns the current value of id.

Returns:

  • (String)

    the current value of id



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

def id
  @id
end

#nameString

Returns the current value of name.

Returns:

  • (String)

    the current value of name



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

def name
  @name
end

#organizationString

Returns the current value of organization.

Returns:

  • (String)

    the current value of organization



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

def organization
  @organization
end

#phoneString

Returns the current value of phone.

Returns:

  • (String)

    the current value of phone



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

def phone
  @phone
end

#stateString

Returns the current value of state.

Returns:

  • (String)

    the current value of state



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

def state
  @state
end

#typeString

Returns the current value of type.

Returns:

  • (String)

    the current value of type



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

def type
  @type
end

#updated_onTime

Returns the current value of updated_on.

Returns:

  • (Time)

    the current value of updated_on



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

def updated_on
  @updated_on
end

#urlString

      1. to the contact form

Returns:

  • (String)

    the current value of url



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

def url
  @url
end

#zipString

Returns the current value of zip.

Returns:

  • (String)

    the current value of zip



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")
    self.const_set(name, TYPE_ADMINISTRATIVE)
  else
    super
  end
end