diff options
| author | Misty De Meo | 2013-10-30 19:14:07 -0700 |
|---|---|---|
| committer | Misty De Meo | 2013-10-30 19:14:07 -0700 |
| commit | 655c6f79b435364cfaf23808f0e5650e3a6d0f72 (patch) | |
| tree | 26d5e25a4c2f74683b4cfddb132dacb05f81b83e /Library | |
| parent | 0f612f845911586dfe5b677575183960a60dffb7 (diff) | |
| download | brew-655c6f79b435364cfaf23808f0e5650e3a6d0f72.tar.bz2 | |
Hardware::CPU: add extmodel helper
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/os/mac/hardware.rb | 4 |
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 |
