Sha256: fdfb952be3096f9bfb82bf92dfe9570692cd72319654fa83aa36ebd10f287eac

Contents?: true

Size: 404 Bytes

Versions: 24

Compression:

Stored size: 404 Bytes

Contents

class ClientStub
  attr_accessor :call_rpc_count, :requests

  def initialize response, operation, &block
    @response = response
    @operation = operation
    @block = block
    @call_rpc_count = 0
    @requests = []
  end

  def call_rpc *args, **kwargs
    @call_rpc_count += 1

    @requests << @block&.call(*args, **kwargs)

    yield @response, @operation if block_given?

    @response
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
gapic-generator-0.11.0 templates/default/service/test/method/_setup.erb
gapic-generator-0.10.1 templates/default/service/test/method/_setup.erb
gapic-generator-0.10.0 templates/default/service/test/method/_setup.erb
gapic-generator-0.9.1 templates/default/service/test/method/_setup.erb
gapic-generator-0.9.0 templates/default/service/test/method/_setup.erb
gapic-generator-0.8.0 templates/default/service/test/method/_setup.erb
gapic-generator-0.7.5 templates/default/service/test/method/_setup.erb
gapic-generator-0.7.4 templates/default/service/test/method/_setup.erb
gapic-generator-0.7.2 templates/default/service/test/method/_setup.erb
gapic-generator-0.7.1 templates/default/service/test/method/_setup.erb
gapic-generator-0.7.0 templates/default/service/test/method/_setup.erb
gapic-generator-0.6.15 templates/default/service/test/method/_setup.erb
gapic-generator-0.6.14 templates/default/service/test/method/_setup.erb
gapic-generator-0.6.13 templates/default/service/test/method/_setup.erb
gapic-generator-0.6.12 templates/default/service/test/method/_setup.erb
gapic-generator-0.6.11 templates/default/service/test/method/_setup.erb
gapic-generator-0.6.10 templates/default/service/test/method/_setup.erb
gapic-generator-0.6.9 templates/default/service/test/method/_setup.erb
gapic-generator-0.6.8 templates/default/service/test/method/_setup.erb
gapic-generator-0.6.7 templates/default/service/test/method/_setup.erb