Class: Minpaso::PCInfo::CPU
- Inherits:
-
Object
- Object
- Minpaso::PCInfo::CPU
- Defined in:
- lib/minpaso.rb
Instance Attribute Summary collapse
-
#processor_name ⇒ Object
readonly
Returns the value of attribute processor_name.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
Instance Method Summary collapse
-
#initialize(elt) ⇒ CPU
constructor
A new instance of CPU.
Constructor Details
#initialize(elt) ⇒ CPU
Returns a new instance of CPU.
155 156 157 158 159 160 161 162 |
# File 'lib/minpaso.rb', line 155 def initialize(elt) elt.elements.each do |e| case e.name when "Score"; @score = e.text.to_f when "ProcessorName"; @processor_name = e.text end end end |
Instance Attribute Details
#processor_name ⇒ Object (readonly)
Returns the value of attribute processor_name.
154 155 156 |
# File 'lib/minpaso.rb', line 154 def processor_name @processor_name end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
154 155 156 |
# File 'lib/minpaso.rb', line 154 def score @score end |