Class: Precursor::EnvVault

Inherits:
Vault
  • Object
show all
Defined in:
lib/env_vault.rb

Overview

Vault that provides config values from environment variables

Instance Attribute Summary

Attributes inherited from Vault

#store

Instance Method Summary collapse

Methods inherited from Vault

#key?, #load, #value

Constructor Details

#initialize(separator: '__', allow_list: []) ⇒ EnvVault

Initializes new instance of [EnvVault]

Parameters:

  • separator (String) (defaults to: '__')

    separator for hierarchical config entries

  • allow_list (Array<String>) (defaults to: [])

    list of allowed env vars to prevent leaking of sensitive or unrelated vars



11
12
13
14
15
16
# File 'lib/env_vault.rb', line 11

def initialize(separator: '__', allow_list: [])
  super()
  @separator = separator

  @allow_set = Set.new(allow_list)
end