Class: File
Class Method Summary collapse
-
.home_directory ⇒ Object
Returns a string containing the user’s home directory.
Class Method Details
.home_directory ⇒ Object
Returns a string containing the user’s home directory.
36 37 38 39 40 41 42 43 44 |
# File 'lib/eymiha.rb', line 36 def self.home_directory home = if Config::CONFIG['target_vendor'] == 'pc' "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH'].gsub(/\\/,File::SEPARATOR)}" else ENV['HOME'] end "#{home}#{File::SEPARATOR}" end |