Class: Minpaso::SearchResultPager::Item
- Inherits:
-
Object
- Object
- Minpaso::SearchResultPager::Item
- Defined in:
- lib/minpaso.rb
Instance Attribute Summary collapse
-
#cpu_score ⇒ Object
readonly
Returns the value of attribute cpu_score.
-
#game_score ⇒ Object
readonly
Returns the value of attribute game_score.
-
#hdd_score ⇒ Object
readonly
Returns the value of attribute hdd_score.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#manufacture ⇒ Object
readonly
Returns the value of attribute manufacture.
-
#memory_score ⇒ Object
readonly
Returns the value of attribute memory_score.
-
#product_name ⇒ Object
readonly
Returns the value of attribute product_name.
-
#total_score ⇒ Object
readonly
Returns the value of attribute total_score.
-
#video_score ⇒ Object
readonly
Returns the value of attribute video_score.
-
#wei_score ⇒ Object
readonly
Returns the value of attribute wei_score.
Instance Method Summary collapse
-
#initialize(elt) ⇒ Item
constructor
A new instance of Item.
-
#pcinfo(guess_score = true) ⇒ Object
Qeury the PC detail informations.
Constructor Details
#initialize(elt) ⇒ Item
Returns a new instance of Item.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/minpaso.rb', line 62 def initialize(elt) elt.elements.each do |e| case e.name when "ItemId"; @id = e.text.to_i when "Manufacture"; @manufacture = e.text when "ProductName"; @product_name = e.text when "WeiScore"; @wei_score = e.text.to_f when "CpuScore"; @cpu_score = e.text.to_f when "MemoryScore"; @memory_score = e.text.to_f when "VideoScore"; @video_score = e.text.to_f when "GameScore"; @game_score = e.text.to_f when "HddScore"; @hdd_score = e.text.to_f when "TotalScore"; @total_score = e.text.to_f end end end |
Instance Attribute Details
#cpu_score ⇒ Object (readonly)
Returns the value of attribute cpu_score.
58 59 60 |
# File 'lib/minpaso.rb', line 58 def cpu_score @cpu_score end |
#game_score ⇒ Object (readonly)
Returns the value of attribute game_score.
59 60 61 |
# File 'lib/minpaso.rb', line 59 def game_score @game_score end |
#hdd_score ⇒ Object (readonly)
Returns the value of attribute hdd_score.
59 60 61 |
# File 'lib/minpaso.rb', line 59 def hdd_score @hdd_score end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
58 59 60 |
# File 'lib/minpaso.rb', line 58 def id @id end |
#manufacture ⇒ Object (readonly)
Returns the value of attribute manufacture.
58 59 60 |
# File 'lib/minpaso.rb', line 58 def manufacture @manufacture end |
#memory_score ⇒ Object (readonly)
Returns the value of attribute memory_score.
59 60 61 |
# File 'lib/minpaso.rb', line 59 def memory_score @memory_score end |
#product_name ⇒ Object (readonly)
Returns the value of attribute product_name.
58 59 60 |
# File 'lib/minpaso.rb', line 58 def product_name @product_name end |
#total_score ⇒ Object (readonly)
Returns the value of attribute total_score.
60 61 62 |
# File 'lib/minpaso.rb', line 60 def total_score @total_score end |
#video_score ⇒ Object (readonly)
Returns the value of attribute video_score.
59 60 61 |
# File 'lib/minpaso.rb', line 59 def video_score @video_score end |
#wei_score ⇒ Object (readonly)
Returns the value of attribute wei_score.
58 59 60 |
# File 'lib/minpaso.rb', line 58 def wei_score @wei_score end |