NAME | = | "Whois" |
GEM | = | "whois" |
AUTHORS | = | ["Simone Carletti <weppos@weppos.net>"] |
VERSION | = | Version::STRING |
NAME | = | "Whois" |
GEM | = | "whois" |
AUTHORS | = | ["Simone Carletti <weppos@weppos.net>"] |
VERSION | = | Version::STRING |
Returns true whether qstring is available. qstring is intended to be a domain name, otherwise this method may return unexpected responses.
Whois.available?("google.com") # => false Whois.available?("google-is-not-available-try-again-later.com") # => true
Warning: this method is only available if a Whois parser exists for qstring top level domain. Otherwise you‘ll get a warning message and the method will return nil. This is a technical limitation. Browse the lib/whois/answer/parsers folder to view all available parsers.
# File lib/whois.rb, line 63 def self.available?(qstring) query(qstring).available? rescue ParserNotFound => e warn "This method is not supported for this kind of object.\n" + "Use Whois.query('#{qstring}') instead." nil end
Returns true whether qstring is available. qstring is intended to be a domain name, otherwise this method may return unexpected responses.
Whois.available?("google.com") # => false Whois.available?("google-is-not-available-try-again-later.com") # => true
Warning: this method is only available if a Whois parser exists for qstring top level domain. Otherwise you‘ll get a warning message and the method will return nil. This is a technical limitation. Browse the lib/whois/answer/parsers folder to view all available parsers.
# File lib/whois.rb, line 63 def self.available?(qstring) query(qstring).available? rescue ParserNotFound => e warn "This method is not supported for this kind of object.\n" + "Use Whois.query('#{qstring}') instead." nil end
# File lib/whois.rb, line 102 def self.deprecate(message = nil) message ||= "You are using deprecated behavior which will be removed from the next major or minor release." warn("DEPRECATION WARNING: #{message}") end
# File lib/whois.rb, line 102 def self.deprecate(message = nil) message ||= "You are using deprecated behavior which will be removed from the next major or minor release." warn("DEPRECATION WARNING: #{message}") end
See Whois#whois.
# File lib/whois.rb, line 97 def self.query(qstring) Client.new.query(qstring) end
See Whois#whois.
# File lib/whois.rb, line 97 def self.query(qstring) Client.new.query(qstring) end
Returns true whether qstring is registered. qstring is intended to be a domain name, otherwise this method may return unexpected responses.
Whois.registered?("google.com") # => true Whois.registered?("google-is-not-available-try-again-later.com") # => false
Warning: this method is only available if a Whois parser exists for qstring top level domain. Otherwise you‘ll get a warning message and the method will return nil. This is a technical limitation. Browse the lib/whois/answer/parsers folder to view all available parsers.
# File lib/whois.rb, line 87 def self.registered?(qstring) query(qstring).registered? rescue ParserNotFound => e warn "This method is not supported for this kind of object.\n" + "Use Whois.query('#{qstring}') instead." nil end
Returns true whether qstring is registered. qstring is intended to be a domain name, otherwise this method may return unexpected responses.
Whois.registered?("google.com") # => true Whois.registered?("google-is-not-available-try-again-later.com") # => false
Warning: this method is only available if a Whois parser exists for qstring top level domain. Otherwise you‘ll get a warning message and the method will return nil. This is a technical limitation. Browse the lib/whois/answer/parsers folder to view all available parsers.
# File lib/whois.rb, line 87 def self.registered?(qstring) query(qstring).registered? rescue ParserNotFound => e warn "This method is not supported for this kind of object.\n" + "Use Whois.query('#{qstring}') instead." nil end
Queries the right whois server for qstring and returns a Whois::Answer instance containing the response from the server.
Whois.query("google.com") # => #<Whois::Answer>
This is equivalent to
Whois::Client.new.query("google.com") # => #<Whois::Answer>
# File lib/whois.rb, line 43 def self.whois(qstring) query(qstring) end
Queries the right whois server for qstring and returns a Whois::Answer instance containing the response from the server.
Whois.query("google.com") # => #<Whois::Answer>
This is equivalent to
Whois::Client.new.query("google.com") # => #<Whois::Answer>
# File lib/whois.rb, line 43 def self.whois(qstring) query(qstring) end