Sha256: 8b9a9709bffae177b2d8d207e281f807e63a3bdcd8d63910028f73ec9ff30574

Contents?: true

Size: 477 Bytes

Versions: 4

Compression:

Stored size: 477 Bytes

Contents

#!/usr/bin/env ruby
require 'protobuf/rpc/client'
require '<%= required_file %>'

# build request
request = <%= module_name %>::<%= Util.modulize(request) %>.new
# TODO: setup a request
raise StandardError, 'setup a request'

# create blank response
response = <%= module_name %>::<%= Util.modulize(response) %>.new

# execute rpc
Protobuf::Rpc::Client.new('localhost', <%= default_port %>).call :<%= Util.underscore(name) %>, request, response

# show response
puts response

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby_protobuf-0.4.11 lib/protobuf/compiler/template/rpc_client.erb
ruby_protobuf-0.4.10 lib/protobuf/compiler/template/rpc_client.erb
ruby_protobuf-0.4.9 lib/protobuf/compiler/template/rpc_client.erb
ruby_protobuf-0.4.8 lib/protobuf/compiler/template/rpc_client.erb