#!/usr/bin/env ruby $: << File.dirname(__FILE__) + "/../target/gen-rb" require "rubygems" require "bundler/setup" require "thrift" require "thrift_client" require "bird_name_service" require "irb" class BirdNameClient < ThriftClient DEFAULTS = { :transport_wrapper => Thrift::FramedTransport } def initialize(servers = nil, options = {}) if servers.nil? or servers.empty? STDERR.puts "No servers specified, using 127.0.0.1:13007" servers = ['127.0.0.1:13007'] else servers = Array(servers) end super(BirdName::BirdNameService::Client, servers, DEFAULTS.merge(options)) end end puts "Hint: the client is in the variable `$client`" $client = BirdNameClient.new ARGV.shift IRB.start