Sha256: 33db62a7b8f478b4e6d6f1c3e3fcc78c60ec523a74c575046fa669d7df546947

Contents?: true

Size: 411 Bytes

Versions: 25

Compression:

Stored size: 411 Bytes

Contents

# frozen_string_literal: true

require 'grpc_kit'
require 'forwardable'

class CallStream < GrpcKit::Call
  include Enumerable
  extend Forwardable
  delegate %i[send_msg recv] => :@inner

  # @params call [GrpcKit::Call]
  def initialize(inner)
    @inner = inner
  end

  def each
    loop { yield(recv) }
  end

  def method_missing(name, *args, &block)
    @inner.public_send(name, *args, &block)
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
grpc_kit-0.5.1 examples/interceptors/call_stream.rb
griffin-0.3.0 examples/interceptors/call_stream.rb
grpc_kit-0.5.0 examples/interceptors/call_stream.rb
grpc_kit-0.4.0 examples/interceptors/call_stream.rb
grpc_kit-0.3.9 examples/interceptors/call_stream.rb
griffin-0.2.4 examples/interceptors/call_stream.rb
grpc_kit-0.3.8 examples/interceptors/call_stream.rb
grpc_kit-0.3.7 examples/interceptors/call_stream.rb
griffin-0.2.3 examples/interceptors/call_stream.rb
grpc_kit-0.3.6 examples/interceptors/call_stream.rb
grpc_kit-0.3.5 examples/interceptors/call_stream.rb
griffin-0.2.2 examples/interceptors/call_stream.rb
grpc_kit-0.3.4 examples/interceptors/call_stream.rb
grpc_kit-0.3.3 examples/interceptors/call_stream.rb
grpc_kit-0.3.2 examples/interceptors/call_stream.rb
griffin-0.2.1 examples/interceptors/call_stream.rb
grpc_kit-0.3.1 examples/interceptors/call_stream.rb
griffin-0.2.0 examples/interceptors/call_stream.rb
grpc_kit-0.3.0 examples/interceptors/call_stream.rb
griffin-0.1.9 examples/interceptors/call_stream.rb