class Whois::Parsers::WhoisComlaudeCom

Parser for the whois.comlaude.com server.

@see Whois::Parsers::Example

The Example parser for the list of all available methods.

Private Instance Methods

build_contact(element, type) click to toggle source
# File lib/whois/parsers/whois.comlaude.com.rb, line 81
def build_contact(element, type)
  match = content_for_scanner.slice(/#{element}\n((.+\n)*)\n\n/, 1)
  return unless match

  lines = match.split("\n").map(&:strip)

  # 0 Domain Manager
  # 1 Nom-IQ Ltd dba Com Laude
  #   2nd Floor, 28-30 Little Russell Street
  #   London WC1A 2HN
  #   United Kingdom
  #   Phone: +44.2078360070
  #   Fax: +44.2078360070
  #   Email: admin@comlaude.com
  Parser::Contact.new(
    :type         => type,
    :name         => lines[0],
    :organization => lines[1],
    :address      => nil,
    :city         => nil,
    :state        => nil,
    :zip          => nil,
    :country      => nil,
    :phone        => match.slice(/Phone: (.*)/, 1),
    :email        => match.slice(/Email: (.*)/, 1),
    :fax          => match.slice(/Fax: (.*)/, 1),
  )
end