Class: Dir
- Inherits:
-
Object
- Object
- Dir
- Defined in:
- lib/cheatorious.rb
Class Method Summary collapse
Class Method Details
.home ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/cheatorious.rb', line 12 def self.home ['HOME', 'USERPROFILE'].each {|e| return ENV[e] if ENV[e] } return "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH']}" if ENV['HOMEDRIVE'] && ENV['HOMEPATH'] File.("~") rescue File::ALT_SEPARATOR ? "C:/" : "/" end |