Class: MacaroonInterceptor

Inherits:
GRPC::ClientInterceptor
  • Object
show all
Defined in:
lib/macaroon_interceptor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#macaroonObject (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