aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os/mac/hardware.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/os/mac/hardware.rb')
-rw-r--r--Library/Homebrew/os/mac/hardware.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/os/mac/hardware.rb b/Library/Homebrew/os/mac/hardware.rb
index 7bda71fa4..a6b5ccf2c 100644
--- a/Library/Homebrew/os/mac/hardware.rb
+++ b/Library/Homebrew/os/mac/hardware.rb
@@ -98,6 +98,12 @@ module MacCPUs
end
end
+ def features
+ @features ||= `/usr/sbin/sysctl -n machdep.cpu.features`.split(" ").map do |s|
+ s.downcase.intern
+ end
+ end
+
def aes?
sysctl_bool('hw.optional.aes')
end