Class: MacaroonInterceptor
- Inherits:
-
GRPC::ClientInterceptor
- Object
- GRPC::ClientInterceptor
- MacaroonInterceptor
- Defined in:
- lib/macaroon_interceptor.rb
Instance Attribute Summary collapse
-
#macaroon ⇒ Object
readonly
Returns the value of attribute macaroon.
Instance Method Summary collapse
-
#initialize(macaroon) ⇒ MacaroonInterceptor
constructor
A new instance of MacaroonInterceptor.
- #request_response(request:, call:, method:, metadata:) ⇒ Object
Constructor Details
#initialize(macaroon) ⇒ MacaroonInterceptor
Returns a new instance of MacaroonInterceptor.
4 5 6 7 |
# File 'lib/macaroon_interceptor.rb', line 4 def initialize(macaroon) @macaroon = macaroon super end |
Instance Attribute Details
#macaroon ⇒ Object (readonly)
Returns the value of attribute macaroon.
2 3 4 |
# File 'lib/macaroon_interceptor.rb', line 2 def macaroon @macaroon end |
Instance Method Details
#request_response(request:, call:, method:, metadata:) ⇒ Object
9 10 11 12 |
# File 'lib/macaroon_interceptor.rb', line 9 def request_response(request:, call:, method:, metadata:) ['macaroon'] = macaroon yield end |