aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2013-10-30 19:14:07 -0700
committerMisty De Meo2013-10-30 19:14:07 -0700
commit655c6f79b435364cfaf23808f0e5650e3a6d0f72 (patch)
tree26d5e25a4c2f74683b4cfddb132dacb05f81b83e /Library
parent0f612f845911586dfe5b677575183960a60dffb7 (diff)
downloadbrew-655c6f79b435364cfaf23808f0e5650e3a6d0f72.tar.bz2
Hardware::CPU: add extmodel helper
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac/hardware.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/os/mac/hardware.rb b/Library/Homebrew/os/mac/hardware.rb
index ace136842..4cd8eb775 100644
--- a/Library/Homebrew/os/mac/hardware.rb
+++ b/Library/Homebrew/os/mac/hardware.rb
@@ -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