aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMisty De Meo2013-10-30 19:14:07 -0700
committerMisty De Meo2013-10-30 19:14:07 -0700
commit1a11844666075c7b1c5041f5bfabf29d54d473bd (patch)
tree1fb845c08a480dd25d6105e03b486b9639c145ac /Library/Homebrew
parent50e428320b11214af844282bbdf39546cabc0b7b (diff)
downloadhomebrew-1a11844666075c7b1c5041f5bfabf29d54d473bd.tar.bz2
Hardware::CPU: add extmodel helper
Diffstat (limited to 'Library/Homebrew')
-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