Class: SecureKeys::Core::Environment::CI
- Inherits:
-
Object
- Object
- SecureKeys::Core::Environment::CI
- Defined in:
- lib/core/environment/ci.rb
Instance Method Summary collapse
-
#fetch(key:) ⇒ String
Fetches the value of the environment variable with the given key.
Instance Method Details
#fetch(key:) ⇒ String
Fetches the value of the environment variable with the given key.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/core/environment/ci.rb', line 12 def fetch(key:) normalized_key = key.to_s.tr('-', '_').upcase ENV[key.to_s] || ENV[normalized_key] || ENV["SECURE_KEYS_#{normalized_key}"] || inline_identifier_value(key) rescue StandardError Core::Console::Logger.error(message: "Error fetching the key '#{key}' from ENV variables") end |