Class: Lshw::CPU
- Inherits:
-
Object
- Object
- Lshw::CPU
- Defined in:
- lib/lshw/cpu.rb
Instance Method Summary collapse
- #bits ⇒ Object
- #flags ⇒ Object
-
#initialize(node) ⇒ CPU
constructor
A new instance of CPU.
- #product ⇒ Object
- #vendor ⇒ Object
Constructor Details
#initialize(node) ⇒ CPU
Returns a new instance of CPU.
3 4 5 |
# File 'lib/lshw/cpu.rb', line 3 def initialize(node) @node = node end |
Instance Method Details
#bits ⇒ Object
7 8 9 |
# File 'lib/lshw/cpu.rb', line 7 def bits @node.search("./width[@units='bits']").text.to_i end |
#flags ⇒ Object
19 20 21 |
# File 'lib/lshw/cpu.rb', line 19 def flags @node.search('.//capability').collect { |f| f.attr('id') } end |
#product ⇒ Object
11 12 13 |
# File 'lib/lshw/cpu.rb', line 11 def product @node.search('./product').text end |
#vendor ⇒ Object
15 16 17 |
# File 'lib/lshw/cpu.rb', line 15 def vendor @node.search('./vendor').text end |