Class: GrpcKit::Interceptors::Server::Streaming
- Inherits:
-
Object
- Object
- GrpcKit::Interceptors::Server::Streaming
- Defined in:
- lib/grpc_kit/interceptors.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.
38 39 40 |
# File 'lib/grpc_kit/interceptors.rb', line 38 def initialize(interceptors) @interceptors = interceptors end |
Instance Method Details
#intercept(call, &block) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/grpc_kit/interceptors.rb', line 42 def intercept(call, &block) if @interceptors && !@interceptors.empty? do_intercept(@interceptors.dup, call, &block) else yield(call) end end |