Class: GrpcKit::Interceptors::Server::Streaming
- Inherits:
-
Object
- Object
- GrpcKit::Interceptors::Server::Streaming
- Defined in:
- lib/grpc_kit/interceptors/streaming.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(interceptors) ⇒ Streaming
constructor
A new instance of Streaming.
- #intercept(call, &block) ⇒ Object
Constructor Details
#initialize(interceptors) ⇒ Streaming
Returns a new instance of Streaming.
41 42 43 |
# File 'lib/grpc_kit/interceptors/streaming.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/streaming.rb', line 45 def intercept(call, &block) if @interceptors && !@interceptors.empty? do_intercept(@interceptors.dup, call, &block) else yield(call) end end |