Sha256: 5bf50cd16c03a72ac192488cbc4b1d284b6df1f507e3d339f6e69f8e3b93acbb

Contents?: true

Size: 570 Bytes

Versions: 9

Compression:

Stored size: 570 Bytes

Contents

require_relative 'cpu_information'
require_relative 'memory_information'
require_relative 'disk_space_information'
require_relative 'entropy_available'
require_relative 'os_information'
module KPM
  module SystemProxy

    module OS
      def OS.windows?
        (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RbConfig::CONFIG["host_os"]) != nil
      end

      def OS.mac?
        (/darwin/ =~ RbConfig::CONFIG["host_os"]) != nil
      end

      def OS.unix?
        !OS.windows?
      end

      def OS.linux?
        OS.unix? and not OS.mac?
      end
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kpm-0.7.2 lib/kpm/system_helpers/system_proxy.rb
kpm-0.7.1 lib/kpm/system_helpers/system_proxy.rb
kpm-0.7.0 lib/kpm/system_helpers/system_proxy.rb
kpm-0.6.5 lib/kpm/system_helpers/system_proxy.rb
kpm-0.6.4 lib/kpm/system_helpers/system_proxy.rb
kpm-0.6.3 lib/kpm/system_helpers/system_proxy.rb
kpm-0.6.2 lib/kpm/system_helpers/system_proxy.rb
kpm-0.6.1 lib/kpm/system_helpers/system_proxy.rb
kpm-0.6.0 lib/kpm/system_helpers/system_proxy.rb