Sha256: de85416303d3db94dedad17169e54ad5d4feab3592bc06311855f87ed973ecc3

Contents?: true

Size: 724 Bytes

Versions: 3

Compression:

Stored size: 724 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

3 entries across 3 versions & 1 rubygems

Version Path
scala-bootstrapper-0.7.0 lib/template/bin/console.erb
scala-bootstrapper-0.6.0 lib/template/bin/console.erb
scala-bootstrapper-0.5.0 lib/template/bin/console.erb