Class: Utils::OS
- Inherits:
-
Object
- Object
- Utils::OS
- Defined in:
- lib/machineid/OS.rb
Instance Method Summary collapse
Instance Method Details
#jruby? ⇒ Boolean
19 20 21 |
# File 'lib/machineid/OS.rb', line 19 def jruby? RUBY_ENGINE == 'jruby' end |
#linux? ⇒ Boolean
15 16 17 |
# File 'lib/machineid/OS.rb', line 15 def linux? self.unix? and not self.mac? end |
#mac? ⇒ Boolean
7 8 9 |
# File 'lib/machineid/OS.rb', line 7 def mac? (/darwin/ =~ RUBY_PLATFORM) != nil end |
#unix? ⇒ Boolean
11 12 13 |
# File 'lib/machineid/OS.rb', line 11 def unix? self.windows? end |
#windows? ⇒ Boolean
3 4 5 |
# File 'lib/machineid/OS.rb', line 3 def windows? (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil end |