Class: Origen::OperatingSystems
- Defined in:
- lib/origen/operating_systems.rb
Overview
Provides methods to detect the operating system used at runtime, an instance of this class is automatically instantiated as Origen.os.
Instance Method Summary collapse
Instance Method Details
#linux? ⇒ Boolean
17 18 19 |
# File 'lib/origen/operating_systems.rb', line 17 def linux? !windows? && !mac? end |
#mac? ⇒ Boolean
13 14 15 |
# File 'lib/origen/operating_systems.rb', line 13 def mac? !!(RUBY_PLATFORM =~ /darwin/) end |
#unix? ⇒ Boolean
21 22 23 |
# File 'lib/origen/operating_systems.rb', line 21 def unix? !windows? end |
#windows? ⇒ Boolean
9 10 11 |
# File 'lib/origen/operating_systems.rb', line 9 def windows? !!(RUBY_PLATFORM =~ /cygwin|mswin|mingw|bccwin|wince|emx/) end |