Hardware::CPU: add extmodel helper

This commit is contained in:
Misty De Meo 2013-10-30 19:14:07 -07:00
parent 0f612f8459
commit 655c6f79b4

View File

@ -68,6 +68,10 @@ module MacCPUs
end
end
def extmodel
@extmodel ||= `/usr/sbin/sysctl -n machdep.cpu.extmodel`.to_i
end
def cores
@cores ||= `/usr/sbin/sysctl -n hw.ncpu`.to_i
end