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