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 | 1a11844666075c7b1c5041f5bfabf29d54d473bd (patch) | |
| tree | 1fb845c08a480dd25d6105e03b486b9639c145ac /Library/Homebrew/os | |
| parent | 50e428320b11214af844282bbdf39546cabc0b7b (diff) | |
| download | homebrew-1a11844666075c7b1c5041f5bfabf29d54d473bd.tar.bz2 | |
Hardware::CPU: add extmodel helper
Diffstat (limited to 'Library/Homebrew/os')
| -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 |
