Sha256: e42fc84f808437ee3d3ad5a156715cc806630aac81a02b2bbb9cbe7a1e7cfdc0
Contents?: true
Size: 727 Bytes
Versions: 4
Compression:
Stored size: 727 Bytes
Contents
#!/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:9999" servers = ['127.0.0.1:9999'] 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
Version data entries
4 entries across 4 versions & 1 rubygems