class Origen::OperatingSystems

Provides methods to detect the operating system used at runtime, an instance of this class is automatically instantiated as Origen.os.

@example

Origen.os.windows?   # => false
Origen.os.linux?     # => true

Public Instance Methods

linux?() click to toggle source
# File lib/origen/operating_systems.rb, line 17
def linux?
  !windows? && !mac?
end
mac?() click to toggle source
# File lib/origen/operating_systems.rb, line 13
def mac?
  !!(RUBY_PLATFORM =~ /darwin/)
end
unix?() click to toggle source
# File lib/origen/operating_systems.rb, line 21
def unix?
  !windows?
end
windows?() click to toggle source
# File lib/origen/operating_systems.rb, line 9
def windows?
  !!(RUBY_PLATFORM =~ /cygwin|mswin|mingw|bccwin|wince|emx/)
end