inspect

ENV.inspect â string Class Public methods Returns the contents of the environment as a String.

index

ENV.index(value) â key Class Public methods Deprecated method that is equivalent to ::key

include?

ENV.include?(name) â true or false Class Public methods Returns true if there is an environment variable with the given name.

has_value?

ENV.has_value?(value) â true or false Class Public methods Returns true if there is an environment variable with the given value.

has_key?

ENV.has_key?(name) â true or false Class Public methods Returns true if there is an environment variable with the given name.

fetch

ENV.fetch(name) â valueENV.fetch(name, default) â valueENV.fetch(name) { |missing_name| ... } â value Class Public methods Retrieves the environment variable name. If the given name does not exist and neither default nor a block a provided an IndexError is raised. If a block is given it is called with the missing name to provide a value. If a default value is given it will be returned when no block is given.

empty?

ENV.empty? â true or false Class Public methods Returns true when there are no environment variables

each_value

ENV.each_value { |value| } â HashENV.each_value â Enumerator Class Public methods Yields each environment variable value. An Enumerator is returned if no block was given.

each_pair

ENV.each_pair { |name, value| } â HashENV.each_pair â Enumerator Class Public methods Yields each environment variable name and value. If no block is given an Enumerator is returned.

each_key

ENV.each_key { |name| } â HashENV.each_key â Enumerator Class Public methods Yields each environment variable name. An Enumerator is returned if no block is given.