Module: EnvVar Private

Extended by:
T::Sig
Defined in:
brew/Library/Homebrew/config.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Helper module for getting environment variables which must be set.

Class Method Summary collapse

Class Method Details

.[](env) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

Returns:

Raises:



18
19
20
21
22
# File 'brew/Library/Homebrew/config.rb', line 18

def self.[](env)
  raise MissingEnvironmentVariables, "#{env} was not exported!" unless ENV[env]

  ENV.fetch(env)
end