Class: Minpaso::PCInfo::System

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elt) ⇒ System

Returns a new instance of System.



140
141
142
143
144
145
146
147
148
149
150
# File 'lib/minpaso.rb', line 140

def initialize(elt)
  elt.elements.each do |e|
    case e.name
    when "Score"; @score = e.text.to_f
    when "TotalScore"; @total_score = e.text.to_f
    when "Manufacturer"; @manufacturer = e.text
    when "ProductName"; @product_name = e.text
    when "Os"; @os = e.text
    end
  end
end

Instance Attribute Details

#manufacturerObject (readonly)

Returns the value of attribute manufacturer.



139
140
141
# File 'lib/minpaso.rb', line 139

def manufacturer
  @manufacturer
end

#osObject (readonly)

Returns the value of attribute os.



139
140
141
# File 'lib/minpaso.rb', line 139

def os
  @os
end

#product_nameObject (readonly)

Returns the value of attribute product_name.



139
140
141
# File 'lib/minpaso.rb', line 139

def product_name
  @product_name
end

#scoreObject (readonly)

Returns the value of attribute score.



139
140
141
# File 'lib/minpaso.rb', line 139

def score
  @score
end

#total_scoreObject (readonly)

Returns the value of attribute total_score.



139
140
141
# File 'lib/minpaso.rb', line 139

def total_score
  @total_score
end