Class: Minpaso::PCInfo::CPU

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (readonly)

Returns the value of attribute processor_name.



154
155
156
# File 'lib/minpaso.rb', line 154

def processor_name
  @processor_name
end

#scoreObject (readonly)

Returns the value of attribute score.



154
155
156
# File 'lib/minpaso.rb', line 154

def score
  @score
end