Class: Lshw::CPU

Inherits:
Object
  • Object
show all
Defined in:
lib/lshw/cpu.rb

Instance Method Summary collapse

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

#bitsObject



7
8
9
# File 'lib/lshw/cpu.rb', line 7

def bits
  @node.search("./width[@units='bits']").text.to_i
end

#flagsObject



19
20
21
# File 'lib/lshw/cpu.rb', line 19

def flags
  @node.search('.//capability').collect { |f| f.attr('id') }
end

#productObject



11
12
13
# File 'lib/lshw/cpu.rb', line 11

def product
  @node.search('./product').text
end

#vendorObject



15
16
17
# File 'lib/lshw/cpu.rb', line 15

def vendor
  @node.search('./vendor').text
end