Class Whois::Server::Adapters::Base
In: lib/whois/server/adapters/base.rb
Parent: Object

Methods

Constants

DEFAULT_WHOIS_PORT = 43   Default Whois request port.

Attributes

allocation  [R] 
buffer  [R] 
host  [R] 
options  [R] 
type  [R] 

Public Class methods

Public Instance methods

Checks self and other for equality.

other - The Whois::Server::Adapter::* to check.

Returns true if the other is the same object, or other attributes matches this object attributes.

Delegates to #==.

other - The Whois::Server::Adapter::* to check.

Returns true or false.

Performs a Whois query for qstring using current server adapter and returns a Whois::Response instance with the result of the request.

qstring - The String to be sent as query parameter.

Internally, this method calls request using the Template Method design pattern.

  server.query("google.com")
  # => Whois::Answer

Returns a Whois::Answer.

Performs the real WHOIS request.

qstring - The String to be sent as query parameter.

This method is not implemented in Whois::Adapter::Base class, it is intended to be overwritten in the concrete subclasses. This is the heart of the Template Method design pattern.

Raises NotImplementedError. Returns nothing.

Protected Instance methods

Store an answer part in @buffer.

[Validate]