Skip to content
Snippets Groups Projects
Commit 33c13875 authored by Markus Reiter's avatar Markus Reiter
Browse files

Refactor and document `Hardware`.

parent 8e789901
No related branches found
No related tags found
No related merge requests found
......@@ -11,10 +11,6 @@ module Hardware
end
end
def cpuinfo
@cpuinfo ||= File.read("/proc/cpuinfo")
end
def family
return :arm if arm?
return :ppc if ppc?
......@@ -94,6 +90,12 @@ module Hardware
def sse4?
flags.include? "sse4_1"
end
private
def cpuinfo
@cpuinfo ||= File.read("/proc/cpuinfo")
end
end
end
end
......@@ -2,7 +2,9 @@
require "utils/popen"
# Helper module for querying hardware information.
module Hardware
# Helper module for querying CPU information.
class CPU
INTEL_32BIT_ARCHS = [:i386].freeze
INTEL_64BIT_ARCHS = [:x86_64].freeze
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment