Class: Protobuf::Node::RpcNode
- Defined in:
- lib/protobuf/compiler/nodes.rb
Instance Method Summary collapse
- #accept_descriptor_visitor(visitor) ⇒ Object
- #accept_message_visitor(visitor) ⇒ Object
- #accept_rpc_visitor(visitor) ⇒ Object
-
#initialize(name, request, response) ⇒ RpcNode
constructor
A new instance of RpcNode.
Methods inherited from Base
Constructor Details
#initialize(name, request, response) ⇒ RpcNode
Returns a new instance of RpcNode.
212 213 214 |
# File 'lib/protobuf/compiler/nodes.rb', line 212 def initialize(name, request, response) @name, @request, @response = name, request, response end |
Instance Method Details
#accept_descriptor_visitor(visitor) ⇒ Object
224 225 226 227 |
# File 'lib/protobuf/compiler/nodes.rb', line 224 def accept_descriptor_visitor(visitor) descriptor = Google::Protobuf::MethodDescriptorProto.new :name => @name.to_s, :input_type => @request.to_s, :output_type => @response.to_s visitor.method_descriptor = descriptor end |
#accept_message_visitor(visitor) ⇒ Object
216 217 218 |
# File 'lib/protobuf/compiler/nodes.rb', line 216 def (visitor) # do nothing end |
#accept_rpc_visitor(visitor) ⇒ Object
220 221 222 |
# File 'lib/protobuf/compiler/nodes.rb', line 220 def accept_rpc_visitor(visitor) visitor.add_rpc @name, @request, @response end |