Class: ProtobufDescriptor::ServiceDescriptor
- Inherits:
-
Object
- Object
- ProtobufDescriptor::ServiceDescriptor
- Includes:
- HasChildren, HasParent, NamedChild
- Defined in:
- lib/protobuf_descriptor/service_descriptor.rb
Overview
Describes a service.
See ServiceDescriptorProto[https://code.google.com/p/protobuf/source/browse/trunk/src/google/protobuf/descriptor.proto#188]
Instance Attribute Summary collapse
-
#method ⇒ Object
(also: #methods)
readonly
Set of methods contained within this service, as a NamedCollection of MethodDescriptors.
-
#parent ⇒ Object
readonly
The parent FileDescriptor.
-
#service_descriptor_proto ⇒ Object
readonly
The +ServiceDescriptorProto+ this +ServiceDescriptor+ is wrapping.
Instance Method Summary collapse
-
#initialize(parent, service_descriptor_proto) ⇒ ServiceDescriptor
constructor
A new instance of ServiceDescriptor.
-
#name ⇒ Object
The name of the service.
-
#options ⇒ Object
The +ServiceOptions+ for this service.
Methods included from HasChildren
#compute_source_code_info_path_component, included, #named_children
Methods included from NamedChild
#fully_qualified_java_name, #fully_qualified_name, #fully_qualified_ruby_name, #fully_qualified_wire_name, #inspect
Methods included from HasParent
#compute_source_code_info_path, #file_descriptor, #leading_comments, #protobuf_descriptor, #source_code_info_location, #source_code_info_locations, #source_code_info_span, #trailing_comments
Constructor Details
#initialize(parent, service_descriptor_proto) ⇒ ServiceDescriptor
Returns a new instance of ServiceDescriptor.
25 26 27 28 29 30 31 32 |
# File 'lib/protobuf_descriptor/service_descriptor.rb', line 25 def initialize(parent, service_descriptor_proto) @parent = parent @service_descriptor_proto = service_descriptor_proto @method = ProtobufDescriptor::NamedCollection.new( service_descriptor_proto.method.map { |m| ProtobufDescriptor::MethodDescriptor.new(self, m) }) end |
Instance Attribute Details
#method ⇒ Object (readonly) Also known as: methods
Set of methods contained within this service, as a NamedCollection of MethodDescriptors
18 19 20 |
# File 'lib/protobuf_descriptor/service_descriptor.rb', line 18 def method @method end |
#parent ⇒ Object (readonly)
The parent FileDescriptor
11 12 13 |
# File 'lib/protobuf_descriptor/service_descriptor.rb', line 11 def parent @parent end |
#service_descriptor_proto ⇒ Object (readonly)
The +ServiceDescriptorProto+ this +ServiceDescriptor+ is wrapping
14 15 16 |
# File 'lib/protobuf_descriptor/service_descriptor.rb', line 14 def service_descriptor_proto @service_descriptor_proto end |
Instance Method Details
#name ⇒ Object
The name of the service
35 |
# File 'lib/protobuf_descriptor/service_descriptor.rb', line 35 def name; service_descriptor_proto.name; end |
#options ⇒ Object
The +ServiceOptions+ for this service.
38 |
# File 'lib/protobuf_descriptor/service_descriptor.rb', line 38 def ; service_descriptor_proto.; end |