Sha256: 117b926bac2fdb1bced16657dc23cc7624d0c649ac15c9938fae7fc0e28e249c

Contents?: true

Size: 483 Bytes

Versions: 4

Compression:

Stored size: 483 Bytes

Contents

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

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

# create blank response
response = <%= message_module %>::<%= 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.7 lib/protobuf/compiler/template/rpc_client.erb
ruby_protobuf-0.4.6 lib/protobuf/compiler/template/rpc_client.erb
ruby_protobuf-0.4.5 lib/protobuf/compiler/template/rpc_client.erb
ruby_protobuf-0.4.4 lib/protobuf/compiler/template/rpc_client.erb