lib/proto_dsl/dsl.rb in proto_dsl-0.1.0 vs lib/proto_dsl/dsl.rb in proto_dsl-0.1.1

- old
+ new

@@ -72,9 +72,17 @@ @enums.each do |enum| output << enum.to_proto end output end + + def to_server_code + output = +"" + @services.each do |service| + output << service.to_server_code + end + output + end end end # This is the main ProtoDsl::Dsl class, which defines a domain-specific language (DSL) for defining Protocol Buffer (protobuf) messages, services, and enums. Protocol Buffers are a language-neutral, platform-neutral, extensible way of serializing structured data for use in communications protocols, data storage, and more.