Skip to content
Snippets Groups Projects
Commit d6fd84af authored by temiola's avatar temiola Committed by Nicolas Noble
Browse files

Updates the generated ruby code to specify the service name.

	Change on 2015/01/08 by temiola <temiola@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83527066
parent 583fe997
No related branches found
No related tags found
No related merge requests found
...@@ -104,6 +104,11 @@ void PrintService(const ServiceDescriptor* service, const string& package, ...@@ -104,6 +104,11 @@ void PrintService(const ServiceDescriptor* service, const string& package,
out->Print("\n"); out->Print("\n");
out->Print("self.marshal_class_method = :encode\n"); out->Print("self.marshal_class_method = :encode\n");
out->Print("self.unmarshal_class_method = :decode\n"); out->Print("self.unmarshal_class_method = :decode\n");
map<string, string> pkg_vars = ListToDict({
"service.name", service->name(),
"pkg.name", package,
});
out->Print(pkg_vars, "self.service_name = '$pkg.name$.$service.name$'\n");
out->Print("\n"); out->Print("\n");
for (int i = 0; i < service->method_count(); ++i) { for (int i = 0; i < service->method_count(); ++i) {
PrintMethod(service->method(i), package, out); PrintMethod(service->method(i), package, out);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment