Sha256: 1b0a9a926814da9bd1679bf8892221f5efc7f09cd569f1346779166b87e99b78

Contents?: true

Size: 754 Bytes

Versions: 5

Compression:

Stored size: 754 Bytes

Contents

#!/usr/bin/env ruby -wKU

require 'optparse'
require 'rubygems'
require 'whois'

opts = OptionParser.new do |opts|
  opts.banner = "Whois: an intelligent pure Ruby Whois client"
  opts.define_head "Usage: whois [options] object"
  opts.separator ""
  opts.separator "Examples:"
  opts.separator " whois ruby-lang.com"
  opts.separator " whois 213.149.247.64"
  opts.separator ""
  opts.separator "Options:"
 
  opts.on_tail("--help", "Show this message") do
    puts opts
    exit
  end
 
  opts.on_tail("-V", "--version", "Show version") do
    puts "#{Whois::NAME} #{Whois::VERSION}"
    exit
  end
end
opts.parse!
 
qstring = ARGV.shift
 
if qstring.to_s.strip.empty?
  puts opts
  exit 1
end
 
@client = Whois::Client.new
puts @client.query(qstring)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
whois-0.8.1 bin/ruby-whois
whois-0.8.0 bin/ruby-whois
whois-0.5.3 bin/ruby-whois
whois-0.5.2 bin/ruby-whois
whois-0.5.1 bin/ruby-whois