Sha256: 29485524b56d6eb903e8109b37a14a4b4be1b7c5cbc6cd7365187b7f0d620444
Contents?: true
Size: 588 Bytes
Versions: 133
Compression:
Stored size: 588 Bytes
Contents
module Origen # 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 class OperatingSystems def windows? !!(RUBY_PLATFORM =~ /cygwin|mswin|mingw|bccwin|wince|emx/) end def mac? !!(RUBY_PLATFORM =~ /darwin/) end def linux? !windows? && !mac? end def unix? !windows? end end def self.os @operating_systems ||= OperatingSystems.new end end
Version data entries
133 entries across 133 versions & 1 rubygems