Class Minpaso::PCInfo
In: lib/minpaso.rb
Parent: Object

PCInfo shows PC detail informations.

Methods

new  

Classes and Modules

Class Minpaso::PCInfo::CPU
Class Minpaso::PCInfo::Graphics
Class Minpaso::PCInfo::HDD
Class Minpaso::PCInfo::Memory
Class Minpaso::PCInfo::System

Attributes

cpu  [R] 
graphics  [R] 
guess_score  [R] 
hdd  [R] 
id  [R] 
memory  [R] 
system  [R] 

Public Class methods

[Source]

     # File lib/minpaso.rb, line 122
122:     def initialize(id, guess_score = true)
123:       @id = id
124:       @guess_score = guess_score
125:       uri = URI.parse("http://minpaso.goga.co.jp/api/pc.php?id=#{@id.to_s}&e=#{guess_score}")
126:       doc = REXML::Document.new(uri.read)
127:       doc.root.elements.each do |elt|
128:         case elt.name
129:         when "System"; @system = System.new(elt)
130:         when "Cpu"; @cpu = CPU.new(elt)
131:         when "Graphics"; @graphics = Graphics.new(elt)
132:         when "Memory"; @memory = Memory.new(elt)
133:         when "Hdd"; @hdd = HDD.new(elt)
134:         end
135:       end
136:     end

[Validate]