Class: Keys::Core::Environment::CI

Inherits:
Object
  • Object
show all
Defined in:
lib/core/environment/ci.rb

Instance Method Summary collapse

Instance Method Details

#fetch(key:) ⇒ String

Fetches the value of the environment variable with the given key.

Parameters:

  • key (String)

    the key of the environment variable to fetch

Returns:

  • (String)

    the value of the environment variable



10
11
12
13
14
# File 'lib/core/environment/ci.rb', line 10

def fetch(key:)
  ENV[formatted_key(key:)]
rescue StandardError
  puts "❌ Error fetching the key: #{key} from ENV variables"
end