aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/hardware.rb
diff options
context:
space:
mode:
authorJack Nagel2013-11-26 20:23:19 -0600
committerJack Nagel2013-11-26 20:23:19 -0600
commit91a69c6e2c20fe5e170a06171dd08bf986235f71 (patch)
treece2fa3460d62e26e4d61df3402982a8c5bb14d0c /Library/Homebrew/hardware.rb
parentf26bea19ab4ce843849fbcd67f4f6f0428257690 (diff)
downloadhomebrew-91a69c6e2c20fe5e170a06171dd08bf986235f71.tar.bz2
Add Hardware::CPU.intel? and Hardware::CPU.ppc?
Diffstat (limited to 'Library/Homebrew/hardware.rb')
-rw-r--r--Library/Homebrew/hardware.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/Library/Homebrew/hardware.rb b/Library/Homebrew/hardware.rb
index 0a52d10db..a47de5247 100644
--- a/Library/Homebrew/hardware.rb
+++ b/Library/Homebrew/hardware.rb
@@ -30,6 +30,14 @@ class Hardware
def is_64_bit?
bits == 64
end
+
+ def intel?
+ type == :intel
+ end
+
+ def ppc?
+ type == :ppc
+ end
end
if OS.mac?
@@ -53,7 +61,7 @@ class Hardware
end
def self.oldest_cpu
- if Hardware::CPU.type == :intel
+ if Hardware::CPU.intel?
if Hardware::CPU.is_64_bit?
:core2
else