aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compat/hardware.rb
diff options
context:
space:
mode:
authorJack Nagel2013-05-09 23:53:26 -0500
committerJack Nagel2013-05-10 23:27:28 -0500
commit3be67f72523b55486cad2bd2fa0f6c79b23c82a4 (patch)
tree7a8b3ea8b9cdfe3f735821a73438c713be31af8b /Library/Homebrew/compat/hardware.rb
parent290a93ea758488486e02ff063a28b57117501c07 (diff)
downloadbrew-3be67f72523b55486cad2bd2fa0f6c79b23c82a4.tar.bz2
Reorganize compat
Diffstat (limited to 'Library/Homebrew/compat/hardware.rb')
-rw-r--r--Library/Homebrew/compat/hardware.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/Library/Homebrew/compat/hardware.rb b/Library/Homebrew/compat/hardware.rb
new file mode 100644
index 000000000..550c10118
--- /dev/null
+++ b/Library/Homebrew/compat/hardware.rb
@@ -0,0 +1,29 @@
+class Hardware
+ class << self
+ def is_32_bit?
+ not CPU.is_64_bit?
+ end
+
+ def is_64_bit?
+ CPU.is_64_bit?
+ end
+
+ def bits
+ Hardware::CPU.bits
+ end
+
+ def cpu_type
+ Hardware::CPU.type
+ end
+
+ def cpu_family
+ Hardware::CPU.family
+ end
+ alias_method :intel_family, :cpu_family
+ alias_method :ppc_family, :cpu_family
+
+ def processor_count
+ Hardware::CPU.cores
+ end
+ end
+end