User home directory lookup adapted from RubyGems.
Source Code
# File rails_generator/lookup.rb, line 25 def Dir.user_home if ENV['HOME'] ENV['HOME'] elsif ENV['USERPROFILE'] ENV['USERPROFILE'] elsif ENV['HOMEDRIVE'] and ENV['HOMEPATH'] "#{ENV['HOMEDRIVE']}:#{ENV['HOMEPATH']}" else File.expand_path '~' end end
<code/>and<pre/>for code samples.