Class: ProtobufDescriptor::ServiceDescriptor
- Inherits:
-
Object
- Object
- ProtobufDescriptor::ServiceDescriptor
- Defined in:
- lib/protobuf_descriptor/service_descriptor.rb
Overview
Describes a service.
Defined Under Namespace
Classes: MethodDescriptor
Instance Attribute Summary collapse
-
#method ⇒ Object
(also: #methods)
readonly
Set of methods contained within this service, as a NamedCollection of MethodDescriptor.
-
#parent ⇒ Object
readonly
The parent FileDescriptor.
-
#service_descriptor_proto ⇒ Object
readonly
The
ServiceDescriptorProto
thisServiceDescriptor
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.
Constructor Details
#initialize(parent, service_descriptor_proto) ⇒ ServiceDescriptor
Returns a new instance of ServiceDescriptor.
76 77 78 79 80 81 82 83 |
# File 'lib/protobuf_descriptor/service_descriptor.rb', line 76 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::ServiceDescriptor::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 MethodDescriptor
74 75 76 |
# File 'lib/protobuf_descriptor/service_descriptor.rb', line 74 def method @method end |
#parent ⇒ Object (readonly)
The parent FileDescriptor
67 68 69 |
# File 'lib/protobuf_descriptor/service_descriptor.rb', line 67 def parent @parent end |
#service_descriptor_proto ⇒ Object (readonly)
The ServiceDescriptorProto
this ServiceDescriptor
is wrapping
70 71 72 |
# File 'lib/protobuf_descriptor/service_descriptor.rb', line 70 def service_descriptor_proto @service_descriptor_proto end |
Instance Method Details
#name ⇒ Object
The name of the service
87 |
# File 'lib/protobuf_descriptor/service_descriptor.rb', line 87 def name; service_descriptor_proto.name; end |
#options ⇒ Object
The ServiceOptions
for this service.
90 |
# File 'lib/protobuf_descriptor/service_descriptor.rb', line 90 def ; service_descriptor_proto.; end |