Programming-Idioms

History of Idiom 205 > diff from v10 to v11

Edit summary for version 11 :
New Ruby implementation by user [steenslag]

Version 10

2019-09-29, 21:01:15

Version 11

2019-09-29, 22:41:07

Idiom #205 Get an environment variable

Read an environment variable with the name "FOO" and assign it to the string variable foo. If it does not exist or if the system does not support environment variables, assign a value of "none".

Idiom #205 Get an environment variable

Read an environment variable with the name "FOO" and assign it to the string variable foo. If it does not exist or if the system does not support environment variables, assign a value of "none".

Extra Keywords
envvar os system
Extra Keywords
envvar os system
Code
foo = ENV["FOO"]
Comments bubble
Returns nil if "FOO" is absent.