Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Checks for amd and intel processors added

  • Loading branch information...
commit 4585f86ac2ce540c55d0e4afa93bc7aa16db6ea1 1 parent 2652250
Michael Edgar authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 lib/cpuid/cpuid.rb
View
12 lib/cpuid/cpuid.rb
@@ -45,6 +45,18 @@ def model_information
end
##
+ # Is the processor an Intel-made processor?
+ def intel?
+ vendor_string == "GenuineIntel"
+ end
+
+ ##
+ # Is the process an AMD-made processor?
+ def amd?
+ vendor_string == "AuthenticAMD"
+ end
+
+ ##
# The "stepping" of the processor, in number form. Intel term for differentiating processors.
#
# @return [Fixnum] the stepping of the processor.
Please sign in to comment.
Something went wrong with that request. Please try again.