Sha256: befb31bfd1293534888d011ab18a358a5a0c530f9e8977e4193e5c46338011bd
Contents?: true
Size: 335 Bytes
Versions: 10
Compression:
Stored size: 335 Bytes
Contents
module Specjour module CPU def self.cores case RUBY_PLATFORM when /darwin/ command('hostinfo') =~ /^(\d+).+logically/ $1.to_i when /linux/ command('grep --count processor /proc/cpuinfo').to_i end end protected def self.command(cmd) %x(#{cmd}) end end end
Version data entries
10 entries across 10 versions & 3 rubygems