Skip to content
Snippets Groups Projects
Commit 8f53953e authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

Merge pull request #6400 from murgatroid99/ruby_empty_proto_package

Made ruby plugin support empty package names
parents 60a1f24f dedae79c
No related branches found
No related tags found
No related merge requests found
...@@ -98,8 +98,8 @@ void PrintService(const ServiceDescriptor *service, const grpc::string &package, ...@@ -98,8 +98,8 @@ void PrintService(const ServiceDescriptor *service, const grpc::string &package,
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");
std::map<grpc::string, grpc::string> pkg_vars = std::map<grpc::string, grpc::string> pkg_vars =
ListToDict({"service.name", service->name(), "pkg.name", package, }); ListToDict({"service_full_name", service->full_name()});
out->Print(pkg_vars, "self.service_name = '$pkg.name$.$service.name$'\n"); out->Print(pkg_vars, "self.service_name = '$service_full_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.
Finish editing this message first!
Please register or to comment