Class: Minpaso::PCInfo::Graphics

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elt) ⇒ Graphics

Returns a new instance of Graphics.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/minpaso.rb', line 181

def initialize(elt)
  elt.elements.each do |e|
    case e.name
    when "VideoScore"; @video_score = e.text.to_f
    when "GameScore"; @game_score = e.text.to_f
    when "Adapter"; @adapter = e.text
    when "DriverVersion"; @driver_version = e.text
    when "TotalGraphicsMemory"; @total_graphics_memory = e.text.to_i.byte
    when "DedicatedVideoMemory"; @dedicated_video_memory = e.text.to_i.byte
    when "DedicatedSystemMemory"; @dedicated_system_memory = e.text.to_i.byte
    when "SharedSystemMemory"; @shared_system_memory = e.text.to_i.byte
    end
  end
end

Instance Attribute Details

#adapterObject (readonly)

Returns the value of attribute adapter.



178
179
180
# File 'lib/minpaso.rb', line 178

def adapter
  @adapter
end

#dedicated_system_memoryObject (readonly)

Returns the value of attribute dedicated_system_memory.



180
181
182
# File 'lib/minpaso.rb', line 180

def dedicated_system_memory
  @dedicated_system_memory
end

#dedicated_video_memoryObject (readonly)

Returns the value of attribute dedicated_video_memory.



179
180
181
# File 'lib/minpaso.rb', line 179

def dedicated_video_memory
  @dedicated_video_memory
end

#driver_versionObject (readonly)

Returns the value of attribute driver_version.



178
179
180
# File 'lib/minpaso.rb', line 178

def driver_version
  @driver_version
end

#game_scoreObject (readonly)

Returns the value of attribute game_score.



178
179
180
# File 'lib/minpaso.rb', line 178

def game_score
  @game_score
end

#shared_system_memoryObject (readonly)

Returns the value of attribute shared_system_memory.



180
181
182
# File 'lib/minpaso.rb', line 180

def shared_system_memory
  @shared_system_memory
end

#total_graphics_memoryObject (readonly)

Returns the value of attribute total_graphics_memory.



179
180
181
# File 'lib/minpaso.rb', line 179

def total_graphics_memory
  @total_graphics_memory
end

#video_scoreObject (readonly)

Returns the value of attribute video_score.



178
179
180
# File 'lib/minpaso.rb', line 178

def video_score
  @video_score
end