Class: Minpaso::PCInfo::Memory
- Inherits:
-
Object
- Object
- Minpaso::PCInfo::Memory
- Defined in:
- lib/minpaso.rb
Instance Attribute Summary collapse
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize(elt) ⇒ Memory
constructor
A new instance of Memory.
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
#score ⇒ Object (readonly)
Returns the value of attribute score.
166 167 168 |
# File 'lib/minpaso.rb', line 166 def score @score end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
166 167 168 |
# File 'lib/minpaso.rb', line 166 def size @size end |