aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/lib
diff options
context:
space:
mode:
authorGravatar nownabe <nownabe@gmail.com>2018-02-27 14:55:26 +0900
committerGravatar nownabe <nownabe@gmail.com>2018-03-13 14:13:46 +0900
commitfcc4b9b68cf597f4f5cc518912c8e398f55fa301 (patch)
tree27a6d8c7f371c0715ff747fbe21ec9972368b17c /src/ruby/lib
parent0dc7c5996ce5091a96632919a3e3befe351b44d0 (diff)
Fix ruby document
1. Organize collapsed ruby yard doc. 2. Update contents about ClientStub#bidi_streamer because bidi#writes_done hasn't existed. https://github.com/grpc/grpc/pull/14535#discussion_r171452923 3. Fix yardoc warnings. Warings: [warn]: Invalid tag format for @return in file `lib/grpc/core/time_consts.rb` near line 36 [warn]: @param tag has duplicate parameter name: set_input_stream_done in file `lib/grpc/generic/bidi_call.rb' near line 70 [warn]: Unknown tag @result in file `lib/grpc/generic/rpc_server.rb` near line 287 [warn]: @param tag has unknown parameter name: in file `lib/grpc/generic/interceptors.rb' near line 158 [warn]: In file `lib/grpc/generic/rpc_server.rb':217: Cannot resolve link to key: from text: ...{key: val, ..} [warn]: In file `lib/grpc/generic/rpc_server.rb':217: Cannot resolve link to key: from text: ...{key: val, ..}
Diffstat (limited to 'src/ruby/lib')
-rw-r--r--src/ruby/lib/grpc/core/time_consts.rb2
-rw-r--r--src/ruby/lib/grpc/generic/bidi_call.rb2
-rw-r--r--src/ruby/lib/grpc/generic/client_stub.rb16
-rw-r--r--src/ruby/lib/grpc/generic/interceptors.rb2
-rw-r--r--src/ruby/lib/grpc/generic/rpc_server.rb4
5 files changed, 11 insertions, 15 deletions
diff --git a/src/ruby/lib/grpc/core/time_consts.rb b/src/ruby/lib/grpc/core/time_consts.rb
index 92cd323fa8..896b720780 100644
--- a/src/ruby/lib/grpc/core/time_consts.rb
+++ b/src/ruby/lib/grpc/core/time_consts.rb
@@ -32,7 +32,7 @@ module GRPC
# * timish == 0 => TimeConsts.ZERO
#
# @param timeish [Number|TimeSpec]
- # @return timeish [Number|TimeSpec]
+ # @return [Number|TimeSpec]
def from_relative_time(timeish)
if timeish.is_a? TimeSpec
timeish
diff --git a/src/ruby/lib/grpc/generic/bidi_call.rb b/src/ruby/lib/grpc/generic/bidi_call.rb
index 3bdcc0062e..086455db0b 100644
--- a/src/ruby/lib/grpc/generic/bidi_call.rb
+++ b/src/ruby/lib/grpc/generic/bidi_call.rb
@@ -64,7 +64,7 @@ module GRPC
# @param requests the Enumerable of requests to send
# @param set_input_stream_done [Proc] called back when we're done
# reading the input stream
- # @param set_input_stream_done [Proc] called back when we're done
+ # @param set_output_stream_done [Proc] called back when we're done
# sending data on the output stream
# @return an Enumerator of requests to yield
def run_on_client(requests,
diff --git a/src/ruby/lib/grpc/generic/client_stub.rb b/src/ruby/lib/grpc/generic/client_stub.rb
index 9a50f8a99d..b193f5c4e1 100644
--- a/src/ruby/lib/grpc/generic/client_stub.rb
+++ b/src/ruby/lib/grpc/generic/client_stub.rb
@@ -58,8 +58,8 @@ module GRPC
# Minimally, a stub is created with the just the host of the gRPC service
# it wishes to access, e.g.,
#
- # my_stub = ClientStub.new(example.host.com:50505,
- # :this_channel_is_insecure)
+ # my_stub = ClientStub.new(example.host.com:50505,
+ # :this_channel_is_insecure)
#
# If a channel_override argument is passed, it will be used as the
# underlying channel. Otherwise, the channel_args argument will be used
@@ -376,7 +376,7 @@ module GRPC
# This is a blocking call.
#
# * the call completes when the next call to provided block returns
- # * [False]
+ # false
#
# * the execution block parameters are two objects for sending and
# receiving responses, each of which blocks waiting for flow control.
@@ -398,13 +398,9 @@ module GRPC
# responses by throwing StopIteration, but can only happen either
# if bidi_call#writes_done is called.
#
- # To terminate the RPC correctly the block:
- #
- # * must call bidi#writes_done and then
- #
- # * either return false as soon as there is no need for other responses
- #
- # * loop on responses#next until no further responses are available
+ # To properly terminate the RPC, the responses should be completely iterated
+ # through; one way to do this is to loop on responses#next until no further
+ # responses are available.
#
# == Errors ==
# An RuntimeError is raised if
diff --git a/src/ruby/lib/grpc/generic/interceptors.rb b/src/ruby/lib/grpc/generic/interceptors.rb
index 24482f3451..56d3cecaad 100644
--- a/src/ruby/lib/grpc/generic/interceptors.rb
+++ b/src/ruby/lib/grpc/generic/interceptors.rb
@@ -153,7 +153,7 @@ module GRPC
#
class InterceptionContext
##
- # @param [Array<GRPC::Interceptor>]
+ # @param interceptors [Array<GRPC::Interceptor>]
#
def initialize(interceptors = [])
@interceptors = interceptors.dup
diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb
index d96e677f20..31ab6a302b 100644
--- a/src/ruby/lib/grpc/generic/rpc_server.rb
+++ b/src/ruby/lib/grpc/generic/rpc_server.rb
@@ -204,7 +204,7 @@ module GRPC
# * connect_md_proc:
# when non-nil is a proc for determining metadata to to send back the client
# on receiving an invocation req. The proc signature is:
- # {key: val, ..} func(method_name, {key: val, ...})
+ # {key: val, ..} func(method_name, {key: val, ...})
#
# * server_args:
# A server arguments hash to be passed down to the underlying core server
@@ -283,7 +283,7 @@ module GRPC
# If run has not been called, this returns immediately.
#
# @param timeout [Numeric] number of seconds to wait
- # @result [true, false] true if the server is running, false otherwise
+ # @return [true, false] true if the server is running, false otherwise
def wait_till_running(timeout = nil)
@run_mutex.synchronize do
@run_cond.wait(@run_mutex, timeout) if @running_state == :not_started