Method: InstAccess.with_config
- Defined in:
- lib/inst_access.rb
.with_config(signing_key:, encryption_key: nil, issuers: nil, service_jwks: nil) ⇒ Object
set a configuration only for the duration of the given block, then revert it. useful for testing.
41 42 43 44 45 46 47 |
# File 'lib/inst_access.rb', line 41 def with_config(signing_key:, encryption_key: nil, issuers: nil, service_jwks: nil) old_config = @config configure(signing_key: signing_key, encryption_key: encryption_key, issuers: issuers, service_jwks: service_jwks) yield ensure @config = old_config end |