Class | Whois::Client |
In: |
lib/whois/client.rb
|
Parent: | Object |
DEFAULT_TIMEOUT | = | 10 | The Integer maximum time to run a whois query, expressed in seconds. |
timeout | [RW] |
Initializes a new Whois::Client with options.
new { |client| ... } => client new(options = {}) { |client| ... } => client
options: | Hash of options (default: {}): :timeout - The Integer script timeout, expressed in seconds (default: DEFAULT_TIMEOUT). |
If block is given, yields self.
Whois::Client: | The client instance. |
client = Whois::Client.new do |c| c.timeout = nil end client.query("google.com")
Queries the right WHOIS server for qstring and returns the response from the server.
qstring: | The String to be sent as query parameter. |
Whois::Answer: | The answer object containing the WHOIS response. |
client.query("google.com") # => #<Whois::Answer>