Class: Lshw::MemoryBank
- Inherits:
-
Object
- Object
- Lshw::MemoryBank
- Defined in:
- lib/lshw/memory_bank.rb
Instance Method Summary collapse
- #description ⇒ Object
- #id ⇒ Object
-
#initialize(node) ⇒ MemoryBank
constructor
A new instance of MemoryBank.
- #product ⇒ Object
- #size ⇒ Object
- #slot ⇒ Object
Constructor Details
#initialize(node) ⇒ MemoryBank
Returns a new instance of MemoryBank.
3 4 5 |
# File 'lib/lshw/memory_bank.rb', line 3 def initialize(node) @node = node end |
Instance Method Details
#description ⇒ Object
15 16 17 |
# File 'lib/lshw/memory_bank.rb', line 15 def description @node.search('./description').text end |
#id ⇒ Object
7 8 9 |
# File 'lib/lshw/memory_bank.rb', line 7 def id @node.search('./physid').text.to_i end |
#product ⇒ Object
19 20 21 |
# File 'lib/lshw/memory_bank.rb', line 19 def product @node.search('./product').text end |
#size ⇒ Object
11 12 13 |
# File 'lib/lshw/memory_bank.rb', line 11 def size @node.search("./size[@units='bytes']").text.to_i end |
#slot ⇒ Object
23 24 25 |
# File 'lib/lshw/memory_bank.rb', line 23 def slot @node.search('./slot').text end |