ENV.to_hash â hashENV.to_h â hash Class Public methods Creates a hash with a copy of the environment variables.
ENV.to_a â Array Class Public methods Converts the environment variables into an array of names and value arrays. ENV.to_a # => [["TERM", "xterm-color"], ["SHELL", "/bin/bash"], ...]
ENV.store(name, value) â value Class Public methods Sets the environment variable name to value. If the value given is nil the environment variable is deleted.
ENV.size Class Public methods Returns the number of environment variables.
ENV.shift â Array or nil Class Public methods Removes an environment variable name-value pair from ENV and returns it as an Array. Returns nil if when the environment is empty.
ENV.select! { |name, value| } â ENV or nilENV.select! â Enumerator Class Public methods Equivalent to ENV#keep_if but returns nil if no changes were made.
ENV.select { |name, value| } â HashENV.select â Enumerator Class Public methods Returns a copy of the environment for entries where the block returns true. Returns an Enumerator if no block was given.
ENV.replace(hash) â env Class Public methods Replaces the contents of the environment variables with the contents of hash.
ENV.reject! { |name, value| } â ENV or nilENV.reject! â Enumerator Class Public methods Equivalent to ENV#delete_if but returns nil if no changes were made. Returns an Enumerator if no block was given.
ENV.reject { |name, value| } â HashENV.reject â Enumerator Class Public methods Same as ENV#delete_if, but works on (and returns) a copy of the environment.
Page 2116 of 2275