Module: Hardware
- Defined in:
- Library/Homebrew/hardware.rb,
Library/Homebrew/extend/os/mac/hardware/cpu.rb,
Library/Homebrew/extend/os/linux/hardware/cpu.rb
Defined Under Namespace
Classes: CPU
Class Method Summary collapse
Class Method Details
.cores_as_words ⇒ Object
133 134 135 136 137 138 139 140 141 142 143 |
# File 'Library/Homebrew/hardware.rb', line 133 def self.cores_as_words case Hardware::CPU.cores when 1 then "single" when 2 then "dual" when 4 then "quad" when 6 then "hexa" when 8 then "octa" else Hardware::CPU.cores end end |
.oldest_cpu ⇒ Object
145 146 147 148 149 150 151 152 153 154 155 |
# File 'Library/Homebrew/hardware.rb', line 145 def self.oldest_cpu if Hardware::CPU.intel? if Hardware::CPU.is_64_bit? :core2 else :core end else Hardware::CPU.family end end |