lib/kpm/system_helpers/system_proxy.rb in kpm-0.7.2 vs lib/kpm/system_helpers/system_proxy.rb in kpm-0.8.0

- old
+ new

@@ -1,28 +1,28 @@ +# 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 OS.windows? - (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RbConfig::CONFIG["host_os"]) != nil + def self.windows? + (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RbConfig::CONFIG['host_os']) != nil end - def OS.mac? - (/darwin/ =~ RbConfig::CONFIG["host_os"]) != nil + def self.mac? + (/darwin/ =~ RbConfig::CONFIG['host_os']) != nil end - def OS.unix? + def self.unix? !OS.windows? end - def OS.linux? - OS.unix? and not OS.mac? + def self.linux? + OS.unix? && !OS.mac? end end - end -end \ No newline at end of file +end