Class: ReloaderInterceptor::ServerInterceptor
- Inherits:
-
GRPC::ServerInterceptor
- Object
- GRPC::ServerInterceptor
- ReloaderInterceptor::ServerInterceptor
- Defined in:
- lib/reloader_interceptor/server_interceptor.rb
Instance Method Summary collapse
-
#initialize(reloader: nil) ⇒ ServerInterceptor
constructor
A new instance of ServerInterceptor.
- #request_response(request:, call:, method:, &block) ⇒ Object
Constructor Details
#initialize(reloader: nil) ⇒ ServerInterceptor
Returns a new instance of ServerInterceptor.
6 7 8 |
# File 'lib/reloader_interceptor/server_interceptor.rb', line 6 def initialize(reloader: nil) @reloader = reloader end |
Instance Method Details
#request_response(request:, call:, method:, &block) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/reloader_interceptor/server_interceptor.rb', line 10 def request_response(request:, call:, method:, &block) return yield unless ReloaderInterceptor.enabled? reloader.wrap do yield end end |