Environment Variables : ENV « Development « Ruby






Environment Variables



ENV['SHELL'] # "/bin/sh" 

ENV['HOME'] # "/Users/d" 

ENV['USER'] # "d" 

ENV.keys.size # 34 

ENV.keys[0, 7] 

ENV.each {|e| puts e.join(': ') }

 








Related examples in the same category

1.use environment variables to decide where to store temporary files