Class: GrpcKit::Interceptors::Client::Streaming

Inherits:
Object
  • Object
show all
Defined in:
lib/grpc_kit/interceptors.rb

Direct Known Subclasses

BidiStreamer, ClientStreamer, ServerStreamer

Instance Method Summary collapse

Constructor Details

#initialize(interceptors) ⇒ Streaming


8
9
10
# File 'lib/grpc_kit/interceptors.rb', line 8

def initialize(interceptors)
  @interceptors = interceptors
end

Instance Method Details

#intercept(call, metadata, &block) ⇒ Object


13
14
15
16
17
18
19
# File 'lib/grpc_kit/interceptors.rb', line 13

def intercept(call, , &block)
  if @interceptors && !@interceptors.empty?
    do_intercept(@interceptors.dup, call, , &block)
  else
    yield(call, )
  end
end