Sha256: bf954e4bc07e1456ebb2f20f1845846208a08f4f319280b5db9a2b4431a15412

Contents?: true

Size: 604 Bytes

Versions: 13

Compression:

Stored size: 604 Bytes

Contents

# frozen_string_literal: true

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 self.windows?
        (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RbConfig::CONFIG['host_os']) != nil
      end

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

      def self.unix?
        !OS.windows?
      end

      def self.linux?
        OS.unix? && !OS.mac?
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
kpm-0.10.6 lib/kpm/system_helpers/system_proxy.rb
kpm-0.11.1 lib/kpm/system_helpers/system_proxy.rb
kpm-0.10.5 lib/kpm/system_helpers/system_proxy.rb
kpm-0.11.0 lib/kpm/system_helpers/system_proxy.rb
kpm-0.10.4 lib/kpm/system_helpers/system_proxy.rb
kpm-0.10.3 lib/kpm/system_helpers/system_proxy.rb
kpm-0.10.2 lib/kpm/system_helpers/system_proxy.rb
kpm-0.10.1 lib/kpm/system_helpers/system_proxy.rb
kpm-0.10.0 lib/kpm/system_helpers/system_proxy.rb
kpm-0.9.0 lib/kpm/system_helpers/system_proxy.rb
kpm-0.8.2 lib/kpm/system_helpers/system_proxy.rb
kpm-0.8.1 lib/kpm/system_helpers/system_proxy.rb
kpm-0.8.0 lib/kpm/system_helpers/system_proxy.rb