Class: Protobuf::Generators::ServiceGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/protobuf/generators/service_generator.rb

Constant Summary

Constants included from Printable

Printable::PARENT_CLASS_ENUM, Printable::PARENT_CLASS_MESSAGE, Printable::PARENT_CLASS_SERVICE

Instance Attribute Summary

Attributes inherited from Base

#descriptor, #namespace, #options

Instance Method Summary collapse

Methods inherited from Base

#fully_qualified_type_namespace, #initialize, #run_once, #serialize_value, #to_s, #type_namespace, validate_tags

Methods included from Printable

#init_printer

Constructor Details

This class inherits a constructor from Protobuf::Generators::Base

Instance Method Details

#compileObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/protobuf/generators/service_generator.rb', line 8

def compile
  run_once(:compile) do
    print_class(descriptor.name, :service) do
      print OptionGenerator.new(descriptor.options, current_indent).to_s if descriptor.options
      descriptor.method.each do |method_descriptor|
        print_method(method_descriptor)
      end
    end
  end
end