Class: SecretStore::Reader
- Inherits:
-
Object
- Object
- SecretStore::Reader
- Defined in:
- lib/secret_store/reader.rb
Overview
Reader reads a configuration with a given name. Configuration is read in following order, first match is returned
-
Environment variable
-
Property File
Class Method Summary collapse
-
.read(name) ⇒ Object
If the given
nameexists as environment variable it will returned otherwise it tries to find the givennameas property in the sceret files described inSECRET_FILE_PATHenvironment variable.
Class Method Details
.read(name) ⇒ Object
If the given name exists as environment variable it will returned otherwise it tries to find the given name as property in the sceret files described in SECRET_FILE_PATH environment variable.
13 14 15 16 |
# File 'lib/secret_store/reader.rb', line 13 def read(name) str = name.to_s env?(str) ? ENV[str] : properties[str] end |