Class: ProtoPlugin::MethodDescriptor
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- ProtoPlugin::MethodDescriptor
- Defined in:
- lib/proto_plugin/method_descriptor.rb
Overview
A wrapper class around Google::Protobuf::MethodDescriptorProto
which provides helpers and more idiomatic Ruby access patterns.
Any method not defined directly is delegated to the descriptor the wrapper was initialized with.
Instance Attribute Summary collapse
- #descriptor ⇒ Google::Protobuf::MethodDescriptorProto readonly
-
#service ⇒ ServiceDescriptor
readonly
The service this method was defined in.
Instance Method Summary collapse
-
#initialize(descriptor, service) ⇒ MethodDescriptor
constructor
A new instance of MethodDescriptor.
Constructor Details
#initialize(descriptor, service) ⇒ MethodDescriptor
Returns a new instance of MethodDescriptor.
23 24 25 26 27 |
# File 'lib/proto_plugin/method_descriptor.rb', line 23 def initialize(descriptor, service) super(descriptor) @descriptor = descriptor @service = service end |
Instance Attribute Details
#descriptor ⇒ Google::Protobuf::MethodDescriptorProto (readonly)
14 15 16 |
# File 'lib/proto_plugin/method_descriptor.rb', line 14 def descriptor @descriptor end |
#service ⇒ ServiceDescriptor (readonly)
The service this method was defined in.
19 20 21 |
# File 'lib/proto_plugin/method_descriptor.rb', line 19 def service @service end |