Class: Minpaso::PCInfo::Memory

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elt) ⇒ Memory

Returns a new instance of Memory.



167
168
169
170
171
172
173
174
# File 'lib/minpaso.rb', line 167

def initialize(elt)
  elt.elements.each do |e|
    case e.name
    when "Score"; @score = e.text.to_f
    when "Size"; @size = e.text.to_i.byte
    end
  end
end

Instance Attribute Details

#scoreObject (readonly)

Returns the value of attribute score.



166
167
168
# File 'lib/minpaso.rb', line 166

def score
  @score
end

#sizeObject (readonly)

Returns the value of attribute size.



166
167
168
# File 'lib/minpaso.rb', line 166

def size
  @size
end