Class: Minpaso::PCInfo::System
- Inherits:
-
Object
- Object
- Minpaso::PCInfo::System
- Defined in:
- lib/minpaso.rb
Instance Attribute Summary collapse
-
#manufacturer ⇒ Object
readonly
Returns the value of attribute manufacturer.
-
#os ⇒ Object
readonly
Returns the value of attribute os.
-
#product_name ⇒ Object
readonly
Returns the value of attribute product_name.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#total_score ⇒ Object
readonly
Returns the value of attribute total_score.
Instance Method Summary collapse
-
#initialize(elt) ⇒ System
constructor
A new instance of System.
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
#manufacturer ⇒ Object (readonly)
Returns the value of attribute manufacturer.
139 140 141 |
# File 'lib/minpaso.rb', line 139 def manufacturer @manufacturer end |
#os ⇒ Object (readonly)
Returns the value of attribute os.
139 140 141 |
# File 'lib/minpaso.rb', line 139 def os @os end |
#product_name ⇒ Object (readonly)
Returns the value of attribute product_name.
139 140 141 |
# File 'lib/minpaso.rb', line 139 def product_name @product_name end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
139 140 141 |
# File 'lib/minpaso.rb', line 139 def score @score end |
#total_score ⇒ Object (readonly)
Returns the value of attribute total_score.
139 140 141 |
# File 'lib/minpaso.rb', line 139 def total_score @total_score end |