Class: Sprout::System::WinNixSystem
- Inherits:
-
WinSystem
- Object
- BaseSystem
- WinSystem
- Sprout::System::WinNixSystem
- Defined in:
- lib/sprout/system/win_nix_system.rb
Overview
The concrete system for Cygwin and Mingw We can't quite treat these users like a typical *nix system, but we can't quite treat them like Windows users either.
One great thing about these users, is that we get to use real processes, rather than the broken processes that windows normally offers.
Constant Summary
Constants inherited from WinSystem
APPLICATION_DATA, LOCAL_SETTINGS
Instance Method Summary (collapse)
Methods inherited from WinSystem
#can_execute?, #clean_path, #format_application_name, #get_and_execute_process_runner, #get_paths, #library
Methods inherited from BaseSystem
#alt_separator?, #application_home, #can_execute?, #clean_path, #env_home, #env_homedrive, #env_homedrive_and_homepath, #env_homepath, #env_userprofile, #execute, #execute_silent, #execute_thread, #find_home, #format_application_name, #get_and_execute_process_runner, #get_process_runner, #home=, #library, #read_from, #tilde_home, #worst_case_home
Instance Method Details
- (Object) home
19 20 21 |
# File 'lib/sprout/system/win_nix_system.rb', line 19 def home @home ||= win_nix_home end |
- (Object) win_home
15 16 17 |
# File 'lib/sprout/system/win_nix_system.rb', line 15 def win_home @win_home ||= ENV['HOMEDRIVE'] + ENV['HOMEPATH'] end |
- (Object) win_nix_home
23 24 25 26 27 28 29 30 31 |
# File 'lib/sprout/system/win_nix_system.rb', line 23 def win_nix_home path = win_home.split('\\').join("/") return path if File.exists?(path) parts = path.split("/") path = parts.shift().downcase + "/" + parts.join("/") path = path.split(":").join("") "/cygdrive/" + path end |