Class: Monkey::FilePaths
- Inherits:
-
Object
- Object
- Monkey::FilePaths
- Defined in:
- lib/helpers/file_paths.rb
Class Method Summary collapse
- .global_apps ⇒ Object
- .global_bit32_apps ⇒ Object
- .global_bit64_apps ⇒ Object
- .hosts_file ⇒ Object
- .root ⇒ Object
Class Method Details
.global_apps ⇒ Object
28 29 30 |
# File 'lib/helpers/file_paths.rb', line 28 def self.global_apps global_bit64_apps || global_bit32_apps end |
.global_bit32_apps ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/helpers/file_paths.rb', line 18 def self.global_bit32_apps if Computer.windows? path = ENV['programfiles(x86)'] if Computer.bit64? path = ENV['programfiles'] if Computer.bit32? return path.gsub(File::ALT_SEPARATOR, File::SEPARATOR) elsif Computer.mac? return File.join(root, '/Applications') end end |
.global_bit64_apps ⇒ Object
12 13 14 15 16 |
# File 'lib/helpers/file_paths.rb', line 12 def self.global_bit64_apps return nil if Computer.bit32? return ENV['programfiles'].gsub(File::ALT_SEPARATOR, File::SEPARATOR) if Computer.windows? return File.join(root, '/Applications') if Computer.mac? end |