Class: RhoDevelopment::Platform
- Defined in:
- lib/build/development/platform.rb
Class Method Summary collapse
Class Method Details
.linux? ⇒ Boolean
11 12 13 |
# File 'lib/build/development/platform.rb', line 11 def self.linux? return /linux/i === RbConfig::CONFIG['host_os'] end |
.osx? ⇒ Boolean
7 8 9 |
# File 'lib/build/development/platform.rb', line 7 def self.osx? return /darwin/i === RbConfig::CONFIG['host_os'] end |
.terminate_process(pid) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/build/development/platform.rb', line 15 def self.terminate_process(pid) if self.windows? system "taskkill /F /PID #{pid}" elsif self.osx? or self.linux? Process.kill('SIGTERM', pid) else raise "Unknown platform #{RbConfig::CONFIG['host_os']}" end end |