1.5.0 (latest) 1.4.1 1.3.0 1.2.0 1.1.0 1.0.1 0.26.0 0.25.0 0.24.0 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

- [Gapic::Config](https://docs.cloud.google.com/ruby/docs/reference/gapic-common/latest/Gapic-Config)

## Example

```ruby
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](https://docs.cloud.google.com/ruby/docs/reference/gapic-common/latest/Gapic-Config-Method), nil) --- The config to look to values for.
**Yields**

- (_self)
**Yield Parameter**

- **_self** ([Gapic::Config::Method](https://docs.cloud.google.com/ruby/docs/reference/gapic-common/latest/Gapic-Config-Method)) --- the object that the method was called on
**Returns**

- ([Method](https://docs.cloud.google.com/ruby/docs/reference/gapic-common/latest/Gapic-Config-Method)) --- a new instance of Method