class Whois::Parsers::ZaCentralRegistry

Parser for the ZA Central Registry servers.

Public Instance Methods

response_throttled?() click to toggle source

Checks whether the response has been throttled.

@return [Boolean]

@example

Please go away for 13 Seconds
# File lib/whois/parsers/za_central_registry.rb, line 50
def response_throttled?
  !!(content_for_scanner =~ /Please go away for \d+ [Ss]econds/)
end

Private Instance Methods

build_contact(element, type) click to toggle source
# File lib/whois/parsers/za_central_registry.rb, line 57
def build_contact(element, type)
  node("#{element} Name") do
    Parser::Contact.new(
        type:         type,
        id:           node("#{element} ID").presence,
        name:         value_for_property(element, 'Name'),
        organization: value_for_property(element, 'Organization'),
        address:      value_for_property(element, 'Street'),
        city:         value_for_property(element, 'City'),
        zip:          value_for_property(element, 'Postal Code'),
        state:        value_for_property(element, 'State/Province'),
        country_code: value_for_property(element, 'Country'),
        phone:        value_for_phone_property(element, 'Phone'),
        fax:          value_for_phone_property(element, 'Fax'),
        email:        value_for_property(element, 'Email')
    )
  end
end