class Whois::Record::Parser::WhoisPirOrg
Parser for the whois.pir.org server.
Public Instance Methods
build_contact(element, type)
click to toggle source
# File lib/whois/record/parser/whois.pir.org.rb, line 64 def build_contact(element, type) node("#{element} ID") do address = [node("#{element} Street")] address = (address + (1..3).map { |i| node("#{element} Street#{i}") }). delete_if { |i| i.nil? || i.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"), :phone => node("#{element} Phone"), :fax => node("#{element} Fax"), :email => node("#{element} Email") ) end end
response_throttled?()
click to toggle source
Checks whether the response has been throttled.
@return [Boolean]
@example
WHOIS LIMIT EXCEEDED - SEE WWW.PIR.ORG/WHOIS FOR DETAILS
# File lib/whois/record/parser/whois.pir.org.rb, line 29 def response_throttled? !!node("response:throttled") end