Sha256: 58114f469ce68fa05edf3ccccbd02b2a395878c38fd4c1d3fee537503bfcf58e
Contents?: true
Size: 336 Bytes
Versions: 8
Compression:
Stored size: 336 Bytes
Contents
module Specjour module CPU def self.cores case RUBY_PLATFORM when /darwin/ command('hostinfo') =~ /^(\d+).+physically/ $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
8 entries across 8 versions & 1 rubygems