Reference documentation and code samples for the gapic-common class Gapic::Config::Method.
Config::Method is a configuration class that represents the configuration for an API RPC call.
Inherits
- Object
Extended By
Example
require "gapic/config" class ServiceConfig extend Gapic :: Config config_attr :host , "localhost" , String config_attr :port , 443 , Integer config_attr :timeout , nil , Numeric , nil config_attr :metadata , nil , Hash , nil attr_reader :rpc_method def initialize parent_config = nil @parent_config = parent_config unless parent_config . nil? @rpc_method = Gapic :: Config :: Method . new yield self if block_given? end end config = ServiceConfig . new config . timeout = 60 config . rpc_method . timeout = 120
Methods
#initialize
def
initialize
(
parent_method
=
nil
)
{
|
_self
|
...
}
-
>
Method
Create a new Config::Method object instance.
Parameter
- parent_method( Gapic::Config::Method , nil) — The config to look to values for.
Yields
- (_self)
Yield Parameter
- _self( Gapic::Config::Method ) — the object that the method was called on
Returns
- ( Method ) — a new instance of Method