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
Source
# File lib/origen/operating_systems.rb, line 13 def mac? !!(RUBY_PLATFORM =~ /darwin/) end
Source
# File lib/origen/operating_systems.rb, line 9 def windows? !!(RUBY_PLATFORM =~ /cygwin|mswin|mingw|bccwin|wince|emx/) end