Class: GrpcKit::Interceptors::Server::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


41
42
43
# File 'lib/grpc_kit/interceptors.rb', line 41

def initialize(interceptors)
  @interceptors = interceptors
end

Instance Method Details

#intercept(call, &block) ⇒ Object


45
46
47
48
49
50
51
# File 'lib/grpc_kit/interceptors.rb', line 45

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