class NZWhois::Contact

User contact for WHOIS response

Public Class Methods

new(parser, contact_type) click to toggle source
# File lib/nz-whois/contact.rb, line 8
def initialize(parser, contact_type)
  @parser = parser
  @contact_type = contact_type
end

Public Instance Methods

address() click to toggle source
# File lib/nz-whois/contact.rb, line 17
def address
  content_for 'Address'
end
city() click to toggle source
# File lib/nz-whois/contact.rb, line 21
def city
  content_for 'City'
end
country() click to toggle source
# File lib/nz-whois/contact.rb, line 33
def country
  content_for 'Country'
end
email() click to toggle source
# File lib/nz-whois/contact.rb, line 45
def email
  content_for 'Email'
end
fax() click to toggle source
# File lib/nz-whois/contact.rb, line 41
def fax
  content_for 'Fax'
end
inspect() click to toggle source
# File lib/nz-whois/contact.rb, line 49
def inspect
  format(
    '#<%<class_name>s:0x%<object_id>p @name=%<name>s @email=%<email>s">',
    class_name: self.class.name,
    object_id: object_id,
    name: name,
    email: email
  )
end
name() click to toggle source
# File lib/nz-whois/contact.rb, line 13
def name
  content_for 'Name'
end
phone() click to toggle source
# File lib/nz-whois/contact.rb, line 37
def phone
  content_for 'Phone'
end
postal_code() click to toggle source
# File lib/nz-whois/contact.rb, line 29
def postal_code
  content_for 'Postal Code'
end
province() click to toggle source
# File lib/nz-whois/contact.rb, line 25
def province
  content_for 'Province'
end

Private Instance Methods

content_for(field) click to toggle source
# File lib/nz-whois/contact.rb, line 61
def content_for(field)
  @parser.content_for "#{@contact_type} #{field}"
end