class Whois::Record::Parser::WhoisNicAsia

Parser for the whois.nic.asia server.

@see Whois::Record::Parser::Example

The Example parser for the list of all available methods.

Public Instance Methods

reserved?() click to toggle source

NEWPROPERTY

# File lib/whois/record/parser/whois.nic.asia.rb, line 74
def reserved?
  !!node("status:reserved")
end

Private Instance Methods

build_contact(element, type) click to toggle source
# File lib/whois/record/parser/whois.nic.asia.rb, line 81
def build_contact(element, type)
  node("#{element} ID") do
    address = ["", "2", "3"].
        map { |i| node("#{element} Address#{i}") }.
        delete_if(&:empty?).
        join("\n")

    Record::Contact.new(
        :type         => type,
        :id           => node("#{element} ID"),
        :name         => node("#{element} Name"),
        :organization => node("#{element} Organization"),
        :address      => address,
        :city         => node("#{element} City"),
        :zip          => node("#{element} Postal Code"),
        :state        => node("#{element} State/Province"),
        :country_code => node("#{element} Country/Economy"),
        :phone        => node("#{element} Phone"),
        :fax          => node("#{element} FAX"),
        :email        => node("#{element} E-mail")
    )
  end
end