Parent

Methods

Class/Module Index [+]

Quicksearch

Dir

Public Class Methods

user_home() click to toggle source

User home directory lookup adapted from RubyGems.

# File lib/rails_generator/lookup.rb, line 27
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

[Validate]

Generated with the Darkfish Rdoc Generator 2.