Skip to content
Snippets Groups Projects
Unverified Commit 39cc754a authored by Markus Reiter's avatar Markus Reiter Committed by GitHub
Browse files

Merge pull request #8451 from reitermarkus/document-hardware

Refactor and document `Hardware`.
parents fbf3d807 33c13875
No related branches found
No related tags found
No related merge requests found
...@@ -11,10 +11,6 @@ module Hardware ...@@ -11,10 +11,6 @@ module Hardware
end end
end end
def cpuinfo
@cpuinfo ||= File.read("/proc/cpuinfo")
end
def family def family
return :arm if arm? return :arm if arm?
return :ppc if ppc? return :ppc if ppc?
...@@ -94,6 +90,12 @@ module Hardware ...@@ -94,6 +90,12 @@ module Hardware
def sse4? def sse4?
flags.include? "sse4_1" flags.include? "sse4_1"
end end
private
def cpuinfo
@cpuinfo ||= File.read("/proc/cpuinfo")
end
end end
end end
end end
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
require "utils/popen" require "utils/popen"
# Helper module for querying hardware information.
module Hardware module Hardware
# Helper module for querying CPU information.
class CPU class CPU
INTEL_32BIT_ARCHS = [:i386].freeze INTEL_32BIT_ARCHS = [:i386].freeze
INTEL_64BIT_ARCHS = [:x86_64].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