Sha256: f6fb9b9cf2f6b66aa93b3e7e8eb1b12182812d15e2a5e787c6244f593d0995a5

Contents?: true

Size: 699 Bytes

Versions: 6

Compression:

Stored size: 699 Bytes

Contents

#!/usr/bin/env ruby
$: << File.dirname(__FILE__) + "/../target/gen-rb"
require "rubygems"
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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
scala-bootstrapper-0.3.0 lib/template/bin/console.erb
scala-bootstrapper-0.2.1 lib/template/bin/console.erb
scala-bootstrapper-0.2.0 lib/template/bin/console.erb
scala-bootstrapper-0.1.3 lib/template/bin/console.erb
scala-bootstrapper-0.1.2 lib/template/bin/console.erb
scala-bootstrapper-0.1.1 lib/template/bin/console.erb